in reply to Re^2: Wanted: humanly readable `script` output
in thread Wanted: humanly readable `script` output

#!/usr/bin/perl use strict; use warnings; open(FILE,"<","typescript") || die; while (my $line=<FILE>) { $line=~s/.\x08//g; $line=~s/\p{IsC}//g; print "$line\n"; } close(FILE);
This left behind a lot of funny things, which, to my eyes look like:
[00m, [01;34m, [01;35m, [m]0;

Replies are listed 'Best First'.
Re^4: Wanted: humanly readable `script` output
by loris (Hermit) on May 05, 2008 at 06:23 UTC

    What is left looks like the colour control sequences for a fancy bash prompt. You might want to set the prompt to something humble with, say

    export PS1='\u@\h\$ '


    "It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ." (from "Slow Loris" by Alexis Deacon)