saving

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Buettner
Date:  
Subject: saving
On Oct 4, 4:10pm, Lynn David Newton wrote:
> Subject: Re: saving
>
> >> Actually, it would be useful to have a program
> >> that pulls *only* the standard 128- or 256-bit
> >> (according to taste) ASCII characters. I'm sure
> >> someone has written one somewhere. strings(1) is
> >> almost good enough, but still leaves a lot of glop
> >> in there.
>
> Kevin> Should be a pretty simple perl script...
>
> I'll write one myself.


How about...

#!/usr/bin/perl -w

while (<>) {
    s/[^\040-\176\n]//g;
    print;
}