19 lines
437 B
Bash
Executable File
19 lines
437 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#
|
|
# Demonstration of the 'if' command
|
|
#
|
|
for fruit in banana apple pear kiwi; do
|
|
if [ "$fruit" == "banana" ]; then
|
|
echo "$fruit: don't eat the skin"
|
|
elif [ "$fruit" == "apple" ]; then
|
|
echo "$fruit: eat the skin or not, as you please"
|
|
elif [ "$fruit" == "kiwi" ]; then
|
|
echo "$fruit: most people remove the skin"
|
|
else
|
|
echo "$fruit: not sure how to handle this"
|
|
fi
|
|
done
|
|
|
|
exit
|