Skip to content

Instantly share code, notes, and snippets.

@cereal-s
Created December 19, 2016 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cereal-s/c09bbc0fc0fffcb3ca3255b90e7164fb to your computer and use it in GitHub Desktop.
Save cereal-s/c09bbc0fc0fffcb3ca3255b90e7164fb to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
if LC_ALL=C grep -q '[^[:print:][:space:]]' "/path/to/file.jpg"; then
echo "file contains non-ascii characters"
else
echo "file contains ascii characters only"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment