Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Wanted: humanly readable `script` output

by mrslopenk (Acolyte)
on May 04, 2008 at 20:25 UTC ( #684475=note: print w/ replies, xml ) Need Help??


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;
characters.


Comment on Re^3: Wanted: humanly readable `script` output
Select or Download Code
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\$ '

    loris


    "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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://684475]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-09-20 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls