delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/18/16:05:11

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Importance: Normal
Subject: Need idea on exec or binary or reference to unix "script" utility to make a
typescript log
To: cygwin AT cygwin DOT com
X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000
Message-ID: <OFB4572F2C.1C69DCEC-ON86256A50.006D37EF@rchland.ibm.com>
From: "Perry Dykes" <pdykes AT us DOT ibm DOT com>
Date: Fri, 18 May 2001 15:02:47 -0500
X-MIMETrack: Serialize by Router on d27ml105/27/M/IBM(Release 5.0.7 |March 21, 2001) at
05/18/2001 03:02:49 PM
MIME-Version: 1.0

Trying to route all my output in a bash script, including set -x output to
a log file during a batch run (really like to see the output when I'm
around as well). I currently use the following early in the script and all
output is routed to the file in variable:

exec &>$TRC_DBG_LOG

Does a decent job, but I would really like to use something like the script
utility that will keep a log for me (listed in advanced bash programming
guide so hoping it is around), and let me watch standard out when I'm there
to watch. I have a hack to use tee, but messing with the --pid= stuff gets
flaky and seems like a hack. Would like to utilize the Unix script utility
in my cygwin bash scripts but I can find it, so I can get out the
challenges with "exec > ...".

So:

a) Once I use exec .. as in above snippet, can it be shut off in same
script (my thought is no), thus
b) is there a unix script utility that I can use under cygwin, and if so
where? A cygwin script utility binary is preferred and I'd smile, but would
accept source.

Regards,
Perry



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019