On Thursday, January 17, 2013 06:53:26 PM John Caruso wrote: > In article <mailman.17739.1358448318.855.bug-b...@gnu.org>, Chet Ramey wrote: > > On 1/17/13 1:01 PM, John Caruso wrote: > >> One feature of other shells (e.g. zsh and tcsh) I'd really love to have > >> in bash is "|&", which redirects both stdout and stderr--basically just > >> a shortcut for "2>&1 |". Has this ever been considered for bash? > > > > That has been in bash since bash-4.0. > > I'm simultaneously happy and chagrined :-) (most of the servers I manage > are on bash 3.x, so I hadn't encountered it). Thanks. > > - John
In scripts it breaks POSIX, conflicts with the coproc operator in kshes, and applies the redirections in an unintuitive order since the same operator redirects stdout first, then applies the stderr redirect after other redirections. It isn't very common to dump multiple streams into one pipe. I suggest avoiding |&. -- Dan Douglas