- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- linux shell menu
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2010 01:40 AM
тАО01-30-2010 01:40 AM
linux shell menu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2010 06:41 AM
тАО01-31-2010 06:41 AM
Re: linux shell menu
The library (and the tutorial) include sample code for menus which you can tailor for your application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2010 08:21 AM
тАО01-31-2010 08:21 AM
Re: linux shell menu
Most Linux distributions include a "dialog" tool that can be used in scripts to create various text-based menus and other dialog boxes.
Use your distribution's package manager to make sure the "dialog" package is installed, then see the documentation that comes with it. At least in Debian, there are a lot of usage examples in /usr/share/doc/dialog/examples, and of course the manual is available with the standard "man dialog" command.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2010 01:33 AM
тАО02-02-2010 01:33 AM
Re: linux shell menu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2010 04:03 AM
тАО02-02-2010 04:03 AM
Re: linux shell menu
###############################
#!/bin/sh
amenu="A. DAILY LOGS CHECKING" ;
bmenu="B. USER-ID MANAGEMENT " ;
cmenu="C. MASTER OFF USER-ID " ;
dmenu="D. PRINTER MANAGEMENT " ;
emenu="E. BACKUP " ;
fmenu="f. HOUSEKEEPING " ;
gmenu="g. PERFORMANCE MONITORING " ;
hmenu="h. SYSTEM INFO ";
imenu="I. OTHERS ";
badchoice () { MSG="Invalid Selection ... Please Try Again" ; }
apick () { ./dailymenu.txt ; }
bpick () { usridmenu.txt ; }
cpick () { masteroffmenu.txt ; }
dpick () { printermenu.txt ; }
epick () { backupmenu.txt ; }
fpick () { housekeepingmenu.txt ; }
gpick () { performancemenu.txt ; }
hpick () { sysinfomenu.txt ; }
ipick () { othersmenu.txt ; }
themenu () {
clear
echo `date`
echo
echo
echo "Please Select:"
echo
echo $amenu
echo $bmenu
echo $cmenu
echo $dmenu
echo $emenu
echo $fmenu
echo $gmenu
echo $hmenu
echo $imenu
echo "J. Exit"
echo
echo $MSG
echo
echo Select by pressing the letter and then ENTER ; }
MSG=
while true
do
themenu
read answer
MSG=
case $answer in
a|A) apick;;
b|B) bpick;;
c|C) cpick;;
d|D) dpick;;
e|E) epick;;
f|F) fpick;;
g|G) gpick;;
h|H) hpick;;
i|I) ipick;;
j|J) break;;
*) badchoice;;
esac
done
###############################
the idea is not mine, look here:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1342366
Unix operates with beer.