Well, as the which blog was deemed useful (although most commentors did already know about it), how about the script Unix command?
It’s very useful for keeping a record of an extended series of actions, like those a DBA will often encounter when implementing a complex change. It’s also useful for attaching a complex working example to a Service Request to illustrate a problem. (That was the example that cropped up the other day that prompted this blog.)
tee -a
is also not bad at all as a quick and dirty “script”.
I do not like in script that you need to be clever to uncipher the command that have been typed
If the admin types
hello[CTRL-A][CTRL-D][CTRL-D][CTRL-D][CTRL-E]s
the command issued is
ls
another way is to turn on logging on a terminal basis, like xterm -lf filename, but it does not work on AIX 🙁
Off topic, but a good tool to run script that should not crash when the user PC or session crashes is SCREEN.
Check
man screen
Cheers
I do not like in script that you need to be clever to uncipher the command that have been typed
True, and a definite weakness, but hopefully not so bad when I’m just running set procedures. It might also be deemed useful (if tricky) to decipher the real actions 😉
script is excellent but as with all sub-shells you lose aliases and functions so remember to source .profile again after typing script.
Good point, Bill