if, else, and elif
if [Some form of conditional test]
then
do thing A
else
do thing B
fiSimple if else Script
#!/bin/bash
echo "How old are you?"
read age
if [ $age -lt 18 ]
then
echo "I think you are too young for this game"
else
echo "Welcome to the club"
fiSimple if, elif, else Script
Operators
Last updated