In addition to the answers you've already received, if you're on a *nix box you can also use the script or tee commands.
The script command is used to capture an entire command shell session, something1 like:
The first script command opens a new shell where all I/O is written to junk.log in addition to the console. The exit ends the shell, and the contents of junk.log should1 be:devo$ script junk.log devo$ ls foo bar baz devo$ exit
The tee command simply copies everything going to STDOUT to the specified file, like this:devo$ ls foo bar baz devo$ exit
Here, the contents of tee would be "foo bar baz\n". Note that the STDERR would still go to wherever it normally goes. You can capture STDERR also if you do something1 like this:devo$ ls | tee junk.log
Hope this helps....devo$ (ls 2>&1) | tee junk.log
1Note: I didn't actually run this on the console of a *nix box, as my Linux box is currently down. So I faked the examples, and may have mucked it up somewhat.
--roboticus
In reply to Re: execution log
by roboticus
in thread execution log
by yburge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |