I'm having some error in my code but I can't understand what the problem is.
#!/bin/bash
ARG_COUNT=$#
EXP_ARGS=2
if [ $ARG_COUNT -eq $EXP_ARGS ]; then
echo "The correct number of parameters was passed: " $EXP_ARGS"."
echo "My name is: "$1 $2"."
else
echo "Incorrect number of command line arguments. We have: " $ARG_COUNT " parameter(s), but we need: "$EXP_ARGS " parameter(s)."
echo "Error#: " 60"
fi
ct=1
while [ $ct -le $ARG_COUNT ]
do
echo "Counting up to the parameter count limit: " $ct
let "ct+=1"
done
The error I keep getting says:
./arg.sh: line 21: unexpected EOF while looking for matching `"'
./arg.sh: line 24: syntax error: unexpected end of file
Any ideas?