Last active
October 2, 2020 06:25
-
-
Save dot/42b1d1186e916e991b8a85ea49d03b3d to your computer and use it in GitHub Desktop.
detect NDF file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
dir=$1 | |
if [ ! -d "$dir" ]; then | |
dir='.' | |
fi | |
find "$dir" -name '*[! -~]*' | while read file | |
do | |
bstr=`basename "$file" | xxd -g1` | |
if [ "`echo $bstr | grep 'e3 82 9a'`" ] || [ "`echo $bstr | grep 'e3 82 99'`" ] ; then | |
echo $file | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment