index all rss twitter github linkedin email

Álvaro Ramírez

08 July 2018 PIPESTATUS for all return codes

From @saruspete's tweet, ${PIPESTATUS[@]} gives ya all piped commands' return codes:

echo foo | grep bar | tr z a | cat
echo ${PIPESTATUS[@]}
0 1 0 0