-
Notifications
You must be signed in to change notification settings - Fork 0
/
Codes
32 lines (32 loc) · 1.28 KB
/
Codes
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
#!/bin/bash
echo "******************************************************************"
echo "**************************** WELCOME *****************************"
echo "******************************************************************"
echo "##################################################################"
echo " SMALL APPLICATION BASED UTILITY SET "
echo "##################################################################"
echo "#1.[Weather Forecasting] #"
echo "#2.[Website Status] #"
echo "#3.[Exit] #"
echo "##################################################################"
read -e -p "Enter your choice [1/2/x]: " -i "x" ch
export http_proxy=http://students:students@10.1.1.1:8080/
export https_proxy=https://students:students@10.1.1.1:8080/
while true
do
case $ch in
1) clear
read -e -p "Enter your choice: " -i "mumbai" loc
a="curl http://wttr.in/"
b="$loc"
c=$ $a$b
break;;
2) clear
read -e -p "Enter the website: " -i "www.mu.ac.in" site
curl -s --head http://$site | grep "HTTP"
break;;
x) echo "You have chosen to exit"
clear && exit
break;;
esac
done