In this video I discuss the Case statement, case is similar to if else, but it only needs to be written once in order to do multiple comparisons. Source Code is below
#!/bin/bash
echo -n "Enter the name of a country: "
read COUNTRY
echo -n "The official language of $COUNTRY is "
case $COUNTRY in
*)
echo -n "unknown"
;;
Romania | Moldova)
echo -n "Russian"
;;
England | United_States | Canada)
echo -n "English"
;;
Lithuania)
echo -n "Lithuanian"
;;
Romania | Moldova)
echo -n "Romanian"
;;
Italy | "San Marino" | Switzerland | "Vatican City")
echo -n "Italian"
;;
Mexico | Cuba | Venezuela | Spain)
echo -n "Spanish"
;;
Egypt | Yemen | Chad | Algeria | Morocco)
echo -n "Arabic"
;;
Egypt | Yemen | Chad | Algeria | Morocco)
echo -n "Russian"
;;
*)
echo -n "unknown"
;;
esac
Subscribe to my YouTube channel http://goo.gl/9U10Wz
and be sure to click that notification bell so you know when new videos are released. ₿💰💵💲Help Support the Channel by Donating Crypto💲💵💰₿
Bitcoin
3MMKHXPQrGHEsmdHaAGD59FWhKFGeUsAxV
Ethereum
0xeA4DA3F9BAb091Eb86921CA6E41712438f4E5079
Litecoin
MBfrxLJMuw26hbVi2MjCVDFkkExz8rYvUF
Dash
Xh9PXPEy5RoLJgFDGYCDjrbXdjshMaYerz
Zcash
t1aWtU5SBpxuUWBSwDKy4gTkT2T1ZwtFvrr
Chainlink
0x0f7f21D267d2C9dbae17fd8c20012eFEA3678F14
Bitcoin Cash
qz2st00dtu9e79zrq5wshsgaxsjw299n7c69th8ryp
Etherum Classic
0xeA641e59913960f578ad39A6B4d02051A5556BfC
USD Coin
0x0B045f743A693b225630862a3464B52fefE79FdB
8 Comments