From 772f20abb0a3a0979c440114bf3a1cff5b3cef03 Mon Sep 17 00:00:00 2001 From: cvpcs Date: Wed, 2 Jun 2010 11:02:31 -0500 Subject: initial import of bash 4.1 --- tests/redir9.sub | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/redir9.sub (limited to 'tests/redir9.sub') diff --git a/tests/redir9.sub b/tests/redir9.sub new file mode 100644 index 0000000..386ae56 --- /dev/null +++ b/tests/redir9.sub @@ -0,0 +1,50 @@ +: ${TMPDIR:=/tmp} + +func() +{ + echo "to stdout" + echo "to stderr" >&2 +} + +TMPFN=$TMPDIR/foo-$$ + +rm -f $TMPFN + +echo hey > $TMPFN +func &>> $TMPFN + +cat $TMPFN + +echo +func &> $TMPFN + +cat $TMPFN + +echo +func >$TMPFN +cat $TMPFN + +echo +echo hey > $TMPFN +func >> $TMPFN +cat $TMPFN + +rm -f $TMPFN + +logfunc() +{ + echo "$@" &>> $TMPDIR/log +} + +type logfunc + +echo foo 2>&1 + +bix() +{ +echo foo |& cat +} + +type bix + +bix -- cgit v1.1