]>
Commit | Line | Data |
---|---|---|
3185942a JA |
1 | : ${TMPDIR:=/tmp} |
2 | ||
3 | func() | |
4 | { | |
5 | echo "to stdout" | |
6 | echo "to stderr" >&2 | |
7 | } | |
8 | ||
9 | TMPFN=$TMPDIR/foo-$$ | |
10 | ||
11 | rm -f $TMPFN | |
12 | ||
13 | echo hey > $TMPFN | |
14 | func &>> $TMPFN | |
15 | ||
16 | cat $TMPFN | |
17 | ||
18 | echo | |
19 | func &> $TMPFN | |
20 | ||
21 | cat $TMPFN | |
22 | ||
23 | echo | |
24 | func >$TMPFN | |
25 | cat $TMPFN | |
26 | ||
27 | echo | |
28 | echo hey > $TMPFN | |
29 | func >> $TMPFN | |
30 | cat $TMPFN | |
31 | ||
32 | rm -f $TMPFN | |
33 | ||
34 | logfunc() | |
35 | { | |
36 | echo "$@" &>> $TMPDIR/log | |
37 | } | |
38 | ||
39 | type logfunc | |
40 | ||
41 | echo foo 2>&1 | |
42 | ||
43 | bix() | |
44 | { | |
45 | echo foo |& cat | |
46 | } | |
47 | ||
48 | type bix | |
49 | ||
50 | bix |