PIPESTATUS works for me.
$ uname -s -r FreeBSD 5.4-RELEASE $ bash --version GNU bash, version 2.05b.0(1)-release (i386-portbld-freebsd4.8) Copyright (C) 2002 Free Software Foundation, Inc.
man bash extract:
- PIPESTATUS
- An array variable (see Arrays below) containing a list of exit status values from the processes in the most-recently-executed foreground pipeline (which may contain only a single command).
In reply to Re^2: Redirecting STDOUT and standard error to file
by ikegami
in thread Redirecting STDOUT and standard error to file
by ramya2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |