command-syntax
Bash pipeline with stderr
Connect stdout and stderr to the next command; implicit descriptor duplication follows explicit redirections on the left.
Formal Syntax & Structure
bash syntaxbash
command |& commandReturn Value
exit status
Connect stdout and stderr to the next command; implicit descriptor duplication follows explicit redirections on the left.
Working Example
Example Snippetbash
{ printf 'data\n'; printf 'note\n' >&2; } |& cat