blob: 3cb30e480d9829865e15e1af5f751195c8d59f33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
# Redirect input to an external command.
. ${KASH_TEST_DIR}/common-include.sh
TMPFILE="/tmp/redirect-3.$$.tmp"
echo 1 > $TMPFILE
echo 2 >> $TMPFILE
echo 3 >> $TMPFILE
VAR=`$CMD_SED -e '/2/!d' < $TMPFILE`
$CMD_RM -f $TMPFILE
if test "$VAR" != "2"; then
echo "redirect-3: FAILURE - VAR=$VAR."
exit 1
fi
echo "redirect-3: SUCCESS"
exit 0
|