[TAG] [TIPS] make script command logs without escape character

Thomas Adam thomas.adam22 at gmail.com
Tue May 27 11:12:10 MSD 2008


2008/5/27 Mulyadi Santosa <mulyadi.santosa at gmail.com>:
> Tired with script-generated log that is cluttered with escape
> characters all over the place?
>
> Try to change the terminal into "dumb" and repeat:
> $ export TERM=dumb
> $ script
> <do whatever necessary to be logged>
> <type exit or press Ctrl-D>
> $ export TERM=xterm
> Switch back to vt100, xterm or other when you're done to recover your
> terminal's original mode.
>
> Observe the generated log:
> $ cat -A typescript

I don't think "cat -A" is standard.  And indeed the canonical approach
to this has always been:

```
script -f foo
$ blah
$ ls
$ sudo rm -fr / # :P
^D

$ col -bx < ./foo > ./foo.transcript
'''

-- Thomas Adam




More information about the TAG mailing list