[GoLUG] Piping, redirection and shellscipts: 3/5/2025 7pm Eastern Standard time

Ron admin at bclug.ca
Wed Mar 5 16:30:17 EST 2025


Steve Litt wrote on 2025-03-05 13:26:

>> echo "${PIPESTATUS[*]}"
>> 
> This is immensely cool, if you use bash.


If you are using zsh, the array is called pipestatus (case matters!) and 
the array indices start at one:

$ false | true
$ echo "${pipestatus[1]} ${pipestatus[2]}"
1 0



More information about the GoLUG mailing list