Help With A Shell Script Error
Can somebody help me with this script please. I'm sorry if it's in the wrong forum but I'm new and couldn't find another relevant forum. I've been trying to write a shell script in a bash shell and when I execute it I get these errors:
./trident: line 13: yes=: command not found
./trident: line 16: yes=: command not found
I tried to fix it myself but just kept getting different errors so can somebody fix it for me please?
echo "Hello. Welcome To The New Text Based Registration System."
echo "Please Enter You First Name"
read fname
echo "Thankyou"
echo "Please Enter Your Surname"
read lname
echo "Thankyou"
echo "Please Enter Your Company Name Or Employer's Company"
read cname
echo "Name: $fname $lname Company/Employer: $cname"
echo "Is This Information Correct"
read yn1
if $yn1= yes
then
echo "Information Stored. Thankyou For Your Time"
elif $yn1= no
then
echo "Please Repeat Process"
until $yn1= yes
do
echo "Please Enter You First Name"
read fname
echo "Thankyou"
echo "Please Enter Your Surname"
read lname
echo "Thankyou"
echo "Please Enter Your Company Name Or Employer's Company"
read cname
echo "Name: fname lname Company/Employer: cname"
echo "Is This Information Correct"
read yn1
done
else
echo "Please Enter 'yes' Or 'no'"
echo "Error Detected Exiting Program"
fi
I'm new at this so it could all be completely wrong but I just want to learn and fix it. I've done some other scripts but when I tried to include a loop its gone wrong thanks in advance to anyone who replys.
|