delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/23/14:34:20

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
Message-ID: <E1B42CFD544FD31193EE0000E87C5CE7E07F41@MAILSERVER2>
From: Glen Coakley <gcoakley AT mqsoftware DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: Unix "script" utility continued... cygwin newbie need a porti
ng expert's help.
Date: Mon, 23 Jul 2001 12:37:17 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

I no longer have your original email so I need you to refersh my memory. 
What is your goal in wanting to capture all of the output of the script?
Does it *have* to be in Script format? Is it just for logging of debugging?
Does the following help you?

You can put the following in your script:

#---------- Start of script -------------------
	#!/bin/sh -x
	(
#----------------------------------------------

# Example body of script 

	grep term /this_file_does_not_exist     # will cause output to
stderr
	grep term /usr/include/sys/termios.h    # will cause output to
stdout

#---------- End of script ---------------------
	) > myoutput.lst 2>&1
#----------------------------------------------

All output including the commands issued will end up in 'myoutput.lst'.
This will work for Bourne derivatives (bash, ksh, etc.) also.

________________________________
Glen Coakley, Sr. Software Engineer
MQSoftware Inc., (763) 543-4845
"Tinkero ergo sum." -- Chuck Murcko


> -----Original Message-----
> From: Perry Dykes [mailto:pdykes AT lakes DOT com]
> Sent: Saturday, June 30, 2001 12:22 AM
> To: cygwin AT cygwin DOT com
> Subject: Re: Unix "script" utility continued... cygwin newbie need a
> porting expert's help. 
> 
> 
> Whoops, here is the source.
> 
> And here is how I'm compiling:
> 
> gcc -I../lib script.c -o script.exe
> 
> Hoping maybe a better command line parm list to avoid problem in
> previous post.
> 
> Regards,
> Perry
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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