non ascii file

Gordon Messmer gordon.messmer at gmail.com
Tue Nov 24 21:44:16 UTC 2015


On 11/24/2015 12:42 PM, Dave Mitchell wrote:
>> how can I get the lines containing non ascii characters?
> perl -ne'print if /[^\x00-\x7f]/' infile > outfile

...and if you want to look for ascii control characters (and delete) in 
addition to non-ascii, maybe:

perl -ne 'print if /[^\x20-\x7e]/' infile


More information about the users mailing list