Files
hpr_website/www/eps/hpr2649/hpr2649_bash10_ex2.sh

17 lines
488 B
Bash
Executable File

#!/bin/bash
#
# Demonstration of the 'case' command
#
for fruit in banana apple pear kiwi nectarine; do
case $fruit in
banana) echo "$fruit: don't eat the skin" ;;
apple) echo "$fruit: eat the skin or not, as you please" ;;
kiwi) echo "$fruit: most people remove the skin" ;;
nectarine) echo "$fruit: leave the skin on and eat it" ;;
*) echo "$fruit: not sure how to advise" ;;
esac
done
exit