VirtualBox

source: kBuild/trunk/src/kash/tests/pipe-2@ 2639

Last change on this file since 2639 was 2285, checked in by bird, 16 years ago

kash/tests: more tests.

  • Property svn:eol-style set to LF
File size: 631 bytes
Line 
1#!/bin/sh
2
3# Pipes input from an builtin command thru an external one.
4
5. ${KASH_TEST_DIR}/common-include.sh
6
7TMPFILE="/tmp/pipe-2.$$.tmp"
8echo piped > $TMPFILE
9$CMD_CAT $TMPFILE \
10 | $CMD_SED -e 's/piped/abc/' \
11 | $CMD_SED -e 's/abc/def/' \
12 | $CMD_SED -e 's/def/ghi/' \
13 | $CMD_SED -e 's/ghi/jkl/' \
14 | $CMD_SED -e 's/jkl/mno/' \
15 | $CMD_SED -e 's/mno/pqr/' \
16 | $CMD_SED -e 's/pqr/stu/' \
17 | $CMD_SED -e 's/stu/vwx/' \
18 | $CMD_SED -e 's/vwx/yz_/' \
19 > $TMPFILE
20
21VAR=`$CMD_CAT $TMPFILE`
22$CMD_RM -f $TMPFILE
23if test "$VAR" != "yz_"; then
24 echo "pipe-2: FAILURE - VAR=$VAR"
25 exit 1
26fi
27echo "pipe-2: SUCCESS"
28exit 0
29
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette