zsh-users
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: jrh@vicor-nb.com (Josh Howard)
Cc: zsh-users@sunsite.auc.dk
Subject: Re: Perl like select()?
Date: Wed, 25 Aug 1999 17:16:04 +0100 (BST)	[thread overview]
Message-ID: <E11JfiW-0001Ad-00@crucigera.fysh.org> (raw)
In-Reply-To: <87so57dfpi.fsf@evermore.vicor-nb.com> from Josh Howard at "Aug 25, 1999  8:48: 9 am"

Josh Howard wrote:
>Is there any way, in a script, to use a "Perl-like" select() to
>associate stdout with a particular file, before the execution of the
>rest of the script?

	exec > file

permanently redirects stdout.  Any redirection can be used this way.

>                    For instance: I have a shell script that I want to 
>simply put ">log.file" at the top, and then start echo'ing and doing
>various output and expect everything to go to log.file,

Interestingly enough, that's the syntax I used for this operation when
designing a new shell from scratch[1].

-zefram

[1] The Elate shell.  It's proprietary and doesn't run on Unix, so don't
ask for it.


  reply	other threads:[~1999-08-25 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-25 15:48 Josh Howard
1999-08-25 16:16 ` Zefram [this message]
1999-08-25 16:48   ` Owen M. Astley
1999-08-25 17:00     ` Bart Schaefer
1999-08-25 17:08       ` Owen M. Astley
1999-08-25 16:49   ` Bart Schaefer
1999-08-25 18:35   ` Josh Howard
1999-08-27 10:56   ` Nemeth Ervin
1999-08-25 16:26 Jay Sekora

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=E11JfiW-0001Ad-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=jrh@vicor-nb.com \
    --cc=zsh-users@sunsite.auc.dk \
    /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).