Conditionals mean you have choices in a path, this is not the same as a loop
if [condition]
then
echo
yes
else
echo "no"
fi
if [ $answer = “Y” ] Brackets do test (can also use function test)
There are some required pieces of syntax such as "then" that are needed for an if statement
echo “Yes” If condition is true (can be multiple statements)
echo “No” If condition is false (can be multiple statements)
fi End of conditional (if backwards) is used to indicate the if statement has ended
if statements can also be nested if you wish to have multiple paths, be careful though! A nested if is NOT the same as two if statements next to each other.
Another kind of conditional. This is still a way of indicating paths and choices, not loops, but has differnt syntax.
If statements can be used to evaluate if one thing has happened, or if you include if-then-else two choices, but they can also include multiple choices by using the if-elseif-elseif...-else