Álvaro Ramírez
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
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