My shell program is:
testname=methun
echo "Please enter your name:"
read username
if [ "$username" == "$testname"]; then
age=20
echo " you are $age years old."
else
echo "How old are you?"
read Age
if [ "$Age" -le 20]; then
echo "you are too young."
else
if["$Age" -ge 100]; then
echo " You are old."
else
echo "you are young."
fi fi fi
Now when I run my program, it's able to take user input and it shows an error. The error is given below:
./filename line linenumber:sysntax error near unexpected token 'then'
./filename line linenumber: 'if["$username" -eq "$testname"]; then'