saving

Kevin Buettner plug-discuss@lists.plug.phoenix.az.us
Fri, 4 Oct 2002 16:20:56 -0700


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;
}