[TAG] [TIPS] make script command logs without escape character
Mulyadi Santosa
mulyadi.santosa at gmail.com
Tue May 27 13:07:43 MSD 2008
Hi Thomas :)
On Tue, May 27, 2008 at 2:12 PM, Thomas Adam <thomas.adam22 at gmail.com> wrote:
> 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
> '''
ahh, I think that's better :) thanks for pointing me that :)
regards,
Mulyadi.
More information about the TAG
mailing list