forked from Abhisheksinha1506/Collection-of-Useful-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
city_checker.sh
36 lines (35 loc) · 1.12 KB
/
city_checker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
select city in Tokyo London "Los Angeles" Moscow Dubai Manchester "New York" Paris Bangalore Johannesburg Istanbul Milan "Abu Dhabi" Pune Nairobi Berlin Karachi Madrid; do
case "$city" in
Tokyo)
country="Japan" ;;
London|Manchester)
country="United Kingdom" ;;
"Los Angeles"|"New York")
country="United States" ;;
Moscow)
country=Russia ;;
Dubai|"Abu Dhabi")
country="United Arab Emirates" ;;
Paris)
country="France" ;;
Bangalore|Pune)
country="India" ;;
Johannesburg)
country="South Africa" ;;
Istanbul)
country="Turkey" ;;
Milan)
country="Italy" ;;
Nairobi)
country="Kenya" ;;
Berlin)
country="Germany" ;;
Karachi)
country="Pakistan" ;;
Madrid)
country="Spain" ;;
esac
echo "$city is in $country"
break
done