From: Wayne Davison <wayned@users.sourceforge.net>
To: zzapper <david@tvis.co.uk>
Cc: zsh-users@sunsite.dk
Subject: Re: capturing output of a script requiring answers to prompts
Date: Mon, 18 Jul 2005 11:27:14 -0700 [thread overview]
Message-ID: <20050718182714.GB19066@blorf.net> (raw)
In-Reply-To: <5c9nd157fcj924v4fdcjlesm9fvq7c5lb6@4ax.com>
On Mon, Jul 18, 2005 at 01:52:51PM +0100, zzapper wrote:
> How can I capture the output of a script requiring answers to prompts.
The best way to capture the full output of an interactive session is
using the "script" utility (which comes with most unix-like operating
systems):
script output.txt
That requires you to run your SCRIPT-FILE from inside the subshell and
then "exit". Alternately, if your version of "script" is new enough:
script -c ./SCRIPT-FILE output.txt
The zsh-specific way to output data to both the terminal and a file is
to use multi-IO:
./SCRIPT-FILE >&1 >output.txt
However, that doesn't capture what the user types.
..wayne..
next prev parent reply other threads:[~2005-07-18 18:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 12:52 zzapper
2005-07-18 15:54 ` zzapper
2005-07-18 18:27 ` Wayne Davison [this message]
2005-07-18 19:29 ` zzapper
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=20050718182714.GB19066@blorf.net \
--to=wayned@users.sourceforge.net \
--cc=david@tvis.co.uk \
--cc=zsh-users@sunsite.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).