What's the error in this bash script?
I have the syntax error: end of file not expected printed out when I execute this bash script and I don't understand why, does anyone have a reason?

     #!bin/bash
    COUNTER=$1
    while [  $COUNTER -ne $2 ]; do
	    echo "$COUNTER " >> pcascript.out
	    COUNTER2=0
	    SUMA=0
	    while [ $COUNTER2 -lt 5 ]; do      
	         elt=/usr/bin/time -f="%e" ./pi.pg $COUNTER
	         SUMA=$SUMA+$elt
			 COUNTER2=$COUNTER2+1
	    done
	    MEDIA=$SUMA/5
	    echo " " >> pcascript.out
	    echo MEDIA >> pcascript.out
	    let COUNTER=$COUNTER+500
    done


What's the error in this bash script?
===

I have the syntax error: end of file not expected printed out when I execute this bash script and I don't understand why, does anyone have a reason?

     #!bin/bash
    COUNTER=$1
    while [  $COUNTER -ne $2 ]; do
	    echo "$COUNTER " >> pcascript.out
	    COUNTER2=0
	    SUMA=0
	    while [ $COUNTER2 -lt 5 ]; do      
	         elt=/usr/bin/time -f="%e" ./pi.pg $COUNTER
	         SUMA=$SUMA+$elt
			 COUNTER2=$COUNTER2+1
	    done
	    MEDIA=$SUMA/5
	    echo " " >> pcascript.out
	    echo MEDIA >> pcascript.out
	    let COUNTER=$COUNTER+500
    done

