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

Xubuntu Home Server on Dell XPS 13 9370

Cygwin + syslog-ng

Installing Fedora 21 on a (late 2014) Mac Mini