Done
Done
/bin/bash
while true; do # Display the menu echo ”Menu:” echo ”1. Display troubleshoot-
ing details of network” echo ”2. Kill a process” echo ”3. View all mounts” echo
”4. Display full format listing” echo ”5. Retrieve DNS name servers” echo ”6.
Check the mount version” echo ”7. Display all running jobs” echo ”8. Display
processes not associated with terminal” echo ”9. Exit”
# Prompt the user to select an option read -p ”Enter your choice (1-9): ” choice
case ”$choice” in 1) # Task 1: Display troubleshooting details of network #
Add your network troubleshooting commands here echo ”Network troubleshoot-
ing details...” ;; 2) # Task 2: Kill a process read -p ”Enter the process ID to
kill: ” pid kill ”$pid” ;; 3) # Task 3: View all mounts mount ;; 4) # Task
4: Display full format listing ls -l ;; 5) # Task 5: Retrieve DNS name servers
cat /etc/resolv.conf ;; 6) # Task 6: Check the mount version mount --version
;; 7) # Task 7: Display all running jobs jobs ;; 8) # Task 8: Display processes
not associated with terminal ps -e --no-headers -o pid,tty,cmd | awk ’$2 == ”?”
{print $1, $3}’ ;; 9) # Exit the script echo ”Exiting...” exit 0 ;; *) echo ”Invalid
choice. Please enter a valid option (1-9).” ;; esac done