What does | & (vertical strip, ampersand) in bash?

What does |& (vertical bar, ampersand) mean in bash? For instance.

 node app.js |& logger -t my-app & 
+5
source share
1 answer

|& - syntactic sugar for 2>&1 | added to Bash 4.
That is, it redirects both standard and erroneous outputs of the command preceding |& to standard input of the next command.

Extended Bash Scripting Guide Documentation

+6
source

All Articles