tc-text-scan: proper whiler

master
Pierre Neidhardt 2013-10-23 20:15:04 +02:00
parent 4d5337a6a1
commit 78ac5b0dcc
1 changed files with 25 additions and 7 deletions

View File

@ -1,10 +1,28 @@
#!/bin/sh
while read -r i; do
echo -n "# "
file "$i"
grep -m1 "\`" "$i"
grep -m1 "oe" "$i"
done <<EOF
$(find . -type f -size -50M -print)
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 [ -z "$(command -v recode)" ]; 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