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

Fedora - VNC through systemd/xinetd

YAML Syntax Highlighting in gedit

Working through the golang tour