Problem updating a variable in a loop

Have you run which tesseract? If so, can you paste the output of the command?