
February 24th, 2011, 04:11 PM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 2
Time spent in forums: 12 m 41 sec
Reputation Power: 0
|
|
|
Capture all screen i/o and error to a file
This isn't a simple redirect problem. I need to capture everything that appears on the terminal when a script runs and send it all to a file. This includes output, error, and user input.
The 'script' command is unsuitable because it forks a shell and when 'script' ends, so do any processes associated with that shell. Sometimes these processes have to continue after 'script' ends and 'script' doesn't allow that.
The reasons the usual I/O redirects (including tee) won't work are that user input isn't captured and also user prompts that request input never appear. Most of the time (but not always) I am calling a perl script, but it could be a shell script or simply a series of commands.
I have to remain in whatever shell I'm in when I log in to a system, so a shell-specific script is out - has to be straight Linux commands. I am starting to think that what I need may not be possible to do in the context of the shell, but I thought I'd ask anyway - you never know.
Thanks for reading all this!
Last edited by bluecrab22 : February 24th, 2011 at 04:12 PM.
Reason: Clarification
|