Logic errors often are the most difficult to locate. When your code tests for the wrong value, you have a logic error.
For example, if your program is supposed to print out the last five lines in a file and it instead prints out the last four, you have a logic error.
With this type of error, your code will run with no syntax errors identified, making the error hard to spot.
You may have to examine your code line by line to find the error.
The following code checks for the value mo instead of the value no.
if["$answer" = "mo" ]
then echo "I will exit the program now"
The next lesson explores options to the shell that help identify the errors in a script.