Finding non ascii characters in a text file

stackoverflow link
http://stackoverflow.com/questions/3001177/how-do-i-grep-for-all-non-ascii-characters-in-unix


My favorite out of this:
grep -P "[\x80-\xFF]" file.xml


This was really useful when compiling AWS Cloudformation templates since you can't have certain characters in the JSON.

Comments

Popular posts from this blog

syslog-ng on cygwin

Failure at installing Fedora 20 on a mac mini

Xubuntu on an HP z420