Here's the whole script, as-is:
for src in *.pgm;
do
# set target file name;
tgt=`./images1procesed/$src`
echo converting $src to $tgt;
# run "binarize" function with threshold=100;
iptool binarize $src $tgt 100
done
... So no, there's no #! line, and I don't have quotes around the for loop. Removing the first semicolon, I get this error:
'/exeme_binarize.sh: line 2: syntax error near unexpected token `do
'/exeme_binarize.sh: line 2: `do
I'm utterly confused. Why wouldn't this work? Is it some quirk about OS X?