If it is really command line, then the simplest solution would surely be the select command within the Korn shell e.g.
#! /bin/ksh PS3="Select an item:" select ITEM in opt1 opt2 opt3 opt4 ; do case "$ITEM" in opt1) ... ;; opt2) ... ;; opt3) ... ;; opt4) ... ;; *) echo "Bad call" ;; esac done
In reply to Re^3: Building a Perl Menu
by Bloodnok
in thread Building a Perl Menu
by walkingthecow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |