index rss mastodon twitter github linkedin email
Álvaro Ramírez
sponsor

Á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