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

YAML Syntax Highlighting in gedit

Fedora - VNC through systemd/xinetd

Sun Java memory fun with logstash