29 lines
507 B
Bash
Executable File
29 lines
507 B
Bash
Executable File
#!/bin/sh
|
||
|
||
if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
|
||
cat<<EOF
|
||
Usage: ${1##*/} FOLDERS
|
||
|
||
Check for files containing common mispelling, like "`" and "´" instead of "'",
|
||
or "oe" instead of "œ".
|
||
|
||
EOF
|
||
fi
|
||
|
||
if ! command -v recode >/dev/null; then
|
||
echo "recode needed."
|
||
exit
|
||
fi
|
||
|
||
for i ; do
|
||
while IFS= read -r j; do
|
||
echo -n "# "
|
||
file "$j"
|
||
grep -m1 "\`" "$j"
|
||
grep -m1 "´" "$j"
|
||
grep -m1 "oe" "$j"
|
||
done <<EOF
|
||
$(find "$i" -type f -size -50M -print)
|
||
EOF
|
||
done
|