#!/bin/bash datei='irgendwas.pdf' test -f all.txt && rm all.txt for (( irun=0 ; irun < 27 ; irun++ )) do echo "Seite ${irun}" convert -density 100 ${datei}[${irun}] -compress none -depth 8 testma.tif tesseract testma.tif testma -l deu cat testma.txt >> all.txt done