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

Re: How to redirect stderr to a pipe and stdout to a file?



On Jun 15, 12:11pm, Pavol Juhas wrote:
} Subject: Re: How to redirect stderr to a pipe and stdout to a file?
}
} On Sun, Jun 15, 2003 at 02:50:30PM +0200, Haakon Riiser wrote:
} > 
} >   $ ls INVALID . 2>&1 >/dev/null | less
} 
} You need to 
}     setopt no_multios

Multios are applied at the "pipeline" level of shell grammar, so you can
also prevent the effects by introducing any complex structure; easiest is
just to wrap the first command in { } like so:

    % { ls INVALID . 2>&1 >/dev/null } | less



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