[PLUG] Logging STDOUT to file

Joshua Keroes jkeroes at eli.net
Wed Sep 3 08:49:02 UTC 2003


Evan Heidtmann <clydefrog at adnap.no-ip.com> wrote:
> I am looking for a way to have everything I see on the screen sent to
> a file at the same time that it is displayed. In other words, I want
> to log all screen output to a file.

Perhaps script(1) would work for you? By default it writes *all* output
- STDIN, STDOUT, STDERR, escape sequences; everything - to a file called
'typescript'. Ex:

sandbox: ~ $ script
Script started, file is typescript
sh-2.05a$ touch foo
sh-2.05a$ ls foo
foo
sh-2.05a$ exit
exit
Script done, file is typescript
sandbox: ~ $ cat typescript
Script started on Wed Sep 03 08:44:04 2003
sh-2.05a$ touch foo
sh-2.05a$ ls foo
foo
sh-2.05a$ exit
exit
 
script done on Wed Sep 03 08:44:33 2003




More information about the PLUG mailing list