zsh-workers
 help / color / mirror / code / Atom feed
From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Zsh users mailing list <zsh-users@math.gatech.edu>,
	Zsh workers mailing list <zsh-workers@math.gatech.edu>
Subject: Multiple output redirection in zsh script.
Date: Thu, 11 Jul 1996 12:54:09 +0400 (MOW)	[thread overview]
Message-ID: <Pine.SV4.3.94.960711124614.17975H-100000@itsrm1> (raw)

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
-------------------------------------------------------------------------




                 reply	other threads:[~1996-07-11  9:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SV4.3.94.960711124614.17975H-100000@itsrm1 \
    --to=borsenkow.msk@sni.de \
    --cc=zsh-users@math.gatech.edu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).