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