What does |&
(vertical bar, ampersand) mean in bash? E.g.
node app.js |& logger -t my-app &
|&
is syntactic sugar for 2>&1 |
added in Bash 4.
I.e. it redirects both standard and error outputs of command preceding |&
to standard input of the following command.
Advanced bash scripting guide documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With