I\'m reading bash script tutorials and this seems like it should work, but I clearly am missing something:
isframecount=0
framecount=0
while read p; do
if [\"$
Watch out for spaces where they matters and where there should be not. In this case, if ["$isframecount" -eq 0] should be if [ "$isframecount" -eq 0 ] (see the spaces after [ and before ]).
The reason for this is that [ is actually the name of a program... See by yourself... Type ls /bin/[... Now, if there is no space, then bash will look for a program named ["0" or something similar, which most certainly does not exist in your path.
Then, the opposite situation... There must be no space around the = in variable assignment. So $isframecount = 1 should be isframecount=1. Note that I also removed the dollar sign, that's the way to go.