Signal9Signal9 — home
online
back to labs

Menu System

MediumShell Scripting25-35 min
The brief

Write an interactive menu script at /root/case/menu.sh. It should print a numbered list of options, read the operator's choice, act on it with a case statement, and keep looping until the operator chooses to quit (or input ends). Make the script executable and make sure it exits cleanly (status 0). Grading feeds choices on stdin and checks that different choices do different things and that the menu keeps reading after each one.

What you'll do
  • Create an executable script at /root/case/menu.sh
  • Display a numbered menu and read a choice
  • Dispatch on the choice with a case statement inside a loop
  • Exit cleanly when the operator quits or input ends

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.