nick34992
8/19/2017 - 8:50 PM

Bash: Favorite Car: read, case

Bash: Favorite Car: read, case

#!/bin/bash

echo "What's your favorite car?"
read CAR

case $CAR in
Honda | Toyota ) echo "Nice! I love" $CAR
;;
Porsche | VW ) echo "Not bad..." $CAR"'s are ok, too"
;;
Yugo | Volvo ) echo "Yuk!" $CAR"'s are ugly"
;;
* ) echo "Sorry, I’m not familiar with that make!"
;;
esac

exit 0