syntax error near unexpected token "fi"
I'm having problems executing this script:
the "syntax error newar unexpected token "fi" comes up. I have tried all that I know. thanks in advance.
#!/bin/bash
#
# START:./numbers.sh $1 $2 $3
#
# $1=$1
# $2=$2
# $3=$3
# "Check number of command line arguments."
# "Three numbers not present print error message."
if [ $# -ne 3 ];
then
# echo "$0: Three numbers must be given"
# echo "Correct number of command line arguments entered."
fi
if [ $1 -gt $2 ] && [ $1 -gt $3 ];
then
echo -e "\033[32m "The first number is the largest"
fi
if [ $2 -gt $1 ] && [ $2 -gt $3 ];
then
echo "The second number is the largest"
fi
if [ $3 -gt $1 ] && [ $3 -gt $2 ];
echo -e "\033[42m "The third number is biggest!"
fi
echo -e "\033[0m Script execution complete"
done
|