Quote:
Originally Posted by dhirendrs
need to find all speical character in my database dump .data files
|
It isn't clear what you mean by "special" characters. For example, you could find all lines with control characters or high bit set using:
Code:
perl -ne 'if (!m/^[ -~]*$/){print $.,":",$_}' test.txt
That will print the line number and content of any line where there is no match on the regular expression (similar to 'grep -v', except that
grep doesn't handle characters with the high bit set in quite the same way).
You could extend this to include all non-numeric characters, eg:
Code:
perl -ne 'if (!m/^[ |0-9.E+-]*$/){print $.,":",$_}' test.txt