-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconditionals_menu_systems.sh
More file actions
46 lines (38 loc) · 950 Bytes
/
conditionals_menu_systems.sh
File metadata and controls
46 lines (38 loc) · 950 Bytes
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
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# Script Name: conditionals_menu_systems.sh
# Author Name: Israel QuirolaSalas
# Date of latest revision: 11/30/2023
# purpose:
# Execution: bash conditionals_menu_systems.sh or ./conditionals_menu_systems.sh chmod -x aconditionals_menu_systems.sh
# Additional Sources:
# Declaration of variables
# Declarations of functions
# Main
while true
do
echo "Menu:"
echo "1. Hello world"
echo "2. Ping self"
echo "3. IP info"
echo "4. Exit"
read -p "Enter your choice: " choice
case $choice in
1)
echo "Hello world!"
;;
2)
ping -c 4 127.0.0.1
;;
3)
ip a
;;
4)
echo "Exiting..."
exit 0
;;
*)
echo "Invalid option. Please choose again."
;;
esac
done
# End