Re: Getting the return value of the last command run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, May 30, 2011 at 11:24:19AM -0500, Robert Nichols wrote:
>      $ true | false | false | true | true
>      $ echo ${PIPESTATUS[*]}
>      0 1 1 0 0

Note that this is bash-ism; don't depend on it in a POSIX environment!

-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux