This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Unix "script" utility continued... cygwin newbie need a porting expert's help.



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@lakes.com]
> Sent: Saturday, June 30, 2001 12:22 AM
> To: cygwin@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]