Pipe output and capture exit status in Bash Pipe output and capture exit status in Bash shell shell