Compare commits

...

2 Commits

2 changed files with 80 additions and 0 deletions

40
menuIP.sh Normal file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
while true; do
clear
echo "==============================="
echo " MAIN MENU "
echo "==============================="
echo "1. Check your external IP"
echo "2. List directory contents"
echo "3. Ping google.com (5 times)"
echo "4. Exit"
echo "-------------------------------"
read -p "Enter option number: " option
case $option in
1)
echo
echo "Your external IP is:"
curl -s https://api.ipify.org
;;
2)
echo
echo "Directory contents:"
ls -la
;;
3)
echo
echo "Pinging google.com (5 times):"
ping -c 5 google.com
;;
4)
echo "Exiting..."
break
;;
*)
echo "Invalid option. Please try again."
;;
esac
echo
read -p "Press Enter to continue..."
done

40
menu_external_ip.sh Normal file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
while true; do
clear
echo "==============================="
echo " MAIN MENU "
echo "==============================="
echo "1. Check your external IP"
echo "2. List directory contents"
echo "3. Ping google.com (5 times)"
echo "4. Exit"
echo "-------------------------------"
read -p "Enter option number: " option
case $option in
1)
echo
echo "Your external IP is:"
curl -s https://api.ipify.org
;;
2)
echo
echo "Directory contents:"
ls -la
;;
3)
echo
echo "Pinging google.com (5 times):"
ping -c 5 google.com
;;
4)
echo "Exiting..."
break
;;
*)
echo "Invalid option. Please try again."
;;
esac
echo
read -p "Press Enter to continue..."
done