Re: How to capture or redirect /dev/tty

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Empty
Date:  
To: Main PLUG discussion list
Subject: Re: How to capture or redirect /dev/tty
wrote:

> I thought I'd use the "screen" command and turn on logging, but "screen" buffers its output to disk so the final 10 lines of warning messages are lost. I solved that problem, this time, by re-running the test and transcribing those last 10 lines from the frozen screen onto paper.
>
> Is there a way to force /dev/tty to disk, unbuffered? Could I munge the "controlling terminal" identity so output goes to disk?


Check out 'script -f'. I think it does pretty much what you want...


benb@nulled:~$ script -f
Script started, file is typescript
benb@nulled:~$ cat foooooooooo
cat: foooooooooo: No such file or directory
benb@nulled:~$ echo fooooooooo
fooooooooo
benb@nulled:~$

(different terminal than the one running script- with -f especially you
will find yourself in an infinite recursion loop where the file is
growing as fast as it is catting :-/ The below output was taken less
than a second after "echo fooooo" returned)

benb@nulled:~$ cat typescript
Script started on Fri 29 Dec 2006 09:33:11 AM MST
benb@nulled:~$ cat foooooooooo
cat: foooooooooo: No such file or directory
benb@nulled:~$ echo fooooooooo
fooooooooo
benb@nulled:~$ benb@nulled:~$


Hope that helps!

~Ben

-- 
---
"Confession only helps if you actually feel bad for your actions.
For you, it would just be a really long boast."
    -Tara
http://www.emptiedout.com
---------------------------------------------------
PLUG-discuss mailing list - 
To subscribe, unsubscribe, or to change  you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss