Simple Script Question.

Hey guys im new to the whole linux and scripting community and am trying to get what (I think) should be a simple script to work.

I understand pretty much everything up to line 20, which is where im getting the following errors:

line 20: [: missing `]'
line 21: -le: command not found 

Any help or advice in understanding this would be greatly appreciated.

The code is:

#Begin Script
#!/bin/sh
echo Please, enter your number
read NUMBER
echo Please, enter your short message
read MESSAGE
echo "Attacking $NUMBER"
echo Continue????? yes/no
read NEXT
if [ "$NEXT" = "no" ]; then
echo " Restarting"
./smsbomber.sh
elif [ "$NEXT" = "yes" ]; then
echo $MESSAGE > 01.txt
echo "how many sms messages to send"
read SMS
echo "number of seconds between messages"
read speed
    Counter=0
    until [ "$SMS 
    -le $COUNTER" ]; do
cat 01.txt | mail -s "SMSBomber" $NUMBER
sleep $speed
    COUNTER=$(( $COUNTER + 1 ))
echo "Attack $COUNTER of $SMS"
echo "Ctrl+c to call of attack"
done
fi
#EndScript

Syntax is incorrect.

until [ $SMS -le $COUNTER ]; do

Hey, I'm playing around with the same script and when I try to run it I get an error saying:

line 21: mail: command not found

anyone know why?

Which flavor of UNIX u r using?

Hi xburningphoenix ,

Can you please post the output of the below mentioned commands :

uname -a
echo $SHELL
whatis mail
whereis mail

I'm running ubuntu 10.04