diff options
Diffstat (limited to 'fullocrdir.sh')
-rwxr-xr-x | fullocrdir.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fullocrdir.sh b/fullocrdir.sh index ce58ff0..d68d2cc 100755 --- a/fullocrdir.sh +++ b/fullocrdir.sh @@ -48,7 +48,7 @@ find "$1" -maxdepth 1 -type f -name '*.hocr' | while read f; do b=`basename "$f" .hocr` d=`dirname "$f"` - pgconf "$f" > "$d/$b.conf" || rm -f "$d/$b.conf" + pgconf "$f" > "$d/$b.conf" 2>/dev/null || rm -f "$d/$b.conf" done echo "Best" @@ -60,8 +60,8 @@ find "$1" -maxdepth 1 -type f -name '*.jpg' | while read f; do best=0 bestfn="" for c in "$d/$b"*conf; do + test ! -f "$c" && continue conf=`cat "$c"` - test "$conf" = "No lines found" && continue if test $conf -gt $best; then best=$conf bestfn="$c" |