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

Re: I/O redirection problem in "zsh"



On Fri, Oct 25, 2002 at 01:44:52PM +0200, Matthias Scheler wrote:
> On Fri, Oct 25, 2002 at 03:16:13PM +0400, Borzenkov Andrey wrote:
> > This ambiguous. Both > and | mean redirection of stdout.
> 
> Is there a better portable way to redirect stderr to the pipe but
> ignore stdout?

I can't actually think of a way. Anyone else? If you are trying to
write a portable script, note that zsh will unset the multios
option when told to emulate sh.

If there isn't a way, perhaps we should make it so that:

  grep localhost /etc/hosts fasel 2>&1 1>/dev/null | cat -b
is different from
  grep localhost /etc/hosts fasel 2>&1 >/dev/null | cat -b

with the 1 causing it to move file-descriptor 1 instead of adding
another output for the pseudo-tee process.

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.



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