#!/bin/sh
for tiffile in *.tif; do
	echo $tiffile;
	boxfile=`echo $tiffile | sed -e 's/.tif/.box/'`
	boxtxtfile=`echo $tiffile | sed -e 's/.tif/.box.txt/'`
	bnfile=`echo $tiffile | sed -e 's/.tif//'`
	tesseract $tiffile $bnfile batch;
	tesseract $tiffile $boxfile batch makebox;
	mv $boxtxtfile $boxfile;
done

