Skip to content

Instantly share code, notes, and snippets.

@tamast
Created April 28, 2013 17:18
Show Gist options
  • Save tamast/5477558 to your computer and use it in GitHub Desktop.
Save tamast/5477558 to your computer and use it in GitHub Desktop.
Bash script for finding non-Ascii characters. example: ./listnonascii.sh "PATH_TO_FOLDER/*"
#!/bin/bash
shownonascii() { grep --color=always -P -n "[\x80-\xFF]"; }
for f in $*
do
echo "Processing $f file.";
cat $f | shownonascii;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment