PIPESTATUS shell variable.

Paul Smith psmith at netezza.com
Tue Jul 24 15:01:31 UTC 2007


> How do I set the PIPESTATUS shell variable, in the ash shell?

You can't.  First, PIPESTATUS is a bash extension, and is not
available in POSIX shells (which ash is trying to be).

Second, you can't have PIPESTATUS unless you also have shell
array variables, which are ALSO bash extensions and not available
in POSIX shells.

And finally, pedantically, you don't set the PIPESTATUS
variable even in bash: rather the shell sets it for you after
a command that involves a pipe.


PIPESTATUS _is_ unquestionably an extraordinarily useful tool,
but unless you're writing scripts specifically for bash (which
is not a great idea, portability-wise) you can't use it.

Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20070724/553ef3e1/attachment-0002.htm 


More information about the busybox mailing list