Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: losing stderr messages



Charles Hallenbeck <chuckh@xxxxxxxxx>:
> I have a command sequence which works as expected when bash is the 
> default shell (/bin/sh) but which fails to capture stderr output when 
> /bin/sh points to zsh. Can someone tell me why, and better yet how to 
> find the missing stderr messages? The sequence is:
> 
> { ./configure && make && make install } &> log &
> 
> When run under bash, all three tasks are backgrounded, and all output is 
> sent to log. Under zsh, all three tasks are backgrounded, but only 
> stdout goes to log. stderr output vanishes somewhere. 

Hi Charles,
'&>' is not a POSIX compliant. It's a shortcut that bash uses, AFAIK.
You could use '>&', which is zsh's shortcut, or (if it's a script,
that uses '#!/bin/sh') stay compatible and use: '> log 2>&1 &'.

Regards, Frank



Messages sorted by: Reverse Date, Date, Thread, Author