zsh-workers
 help / color / mirror / code / Atom feed
* Multiple output redirection in zsh script.
@ 1996-07-11  8:54 Andrej Borsenkow
  0 siblings, 0 replies; only message in thread
From: Andrej Borsenkow @ 1996-07-11  8:54 UTC (permalink / raw)
  To: Zsh users mailing list, Zsh workers mailing list

Hi!

Is it possible to switch zsh output to file *and* terminal (the way tee
does) and then back? I have tried

exec > /dec/fd/1 > /some/output/file
date
exec > /dev/fd/1
date

After first exec output is really redirected to both terminal and file.
But I have found that it is not possible any more to close file!!! that
is, second exec does nothing - output is still directed to both.

Yes, I know at least two means to do the same; but I really would prefer
the above method, because otherweise
  I have to use { ...... } > .. > .. construct. It potentially means
  many levels of { } bracketing, which I would like to avoid.

thanks in advance

greetings

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-07-11  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-11  8:54 Multiple output redirection in zsh script Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).