[PLUG] Saving terminal commands
Russell Senior
russell at personaltelco.net
Wed Feb 4 21:55:34 UTC 2009
>>>>> "Paul" == Paul Mullen <pm at nellump.net> writes:
>> FWIW, I have taken to capturing build logs using script lately,
>> e.g.:
>>
>> script -a -c 'make' build-foo.log
Paul> Another option is "tee":
Paul> make yourtargethere 2>&1 | tee build-foo.log
Paul> That'll capture STDOUT and STDERR, displaying both while saving
Paul> them to the log file. TMTOWTDI!
That's probably the more traditional way, but (maybe I'm an idiot ...
strike that, I *am* an idiot, at least in this particular way) I seem
to recall seeing some buffering artifacts doing it that way. That is,
STDOUT and STDERR buffer up lines and dump them potentially out of
sequence. The nice thing I think I am getting with the script
approach is that I get output as it's emitted without the buffering.
Maybe I am just doing something dumb, or remembering (or
misremembering) from the caveman days.
--
Russell Senior, Secretary
russell at personaltelco.net
More information about the PLUG
mailing list