- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- linux shell menu
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
linux shell menu
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-30-2010 01:40 AM
01-30-2010 01:40 AM
linux shell menu
linux shell menu
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-31-2010 06:41 AM
01-31-2010 06:41 AM
Re: linux shell menu
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-31-2010 08:21 AM
01-31-2010 08:21 AM
Re: linux shell menu
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-02-2010 01:33 AM
02-02-2010 01:33 AM
Re: linux shell menu
Re: linux shell menu
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-02-2010 04:03 AM
02-02-2010 04:03 AM
Re: linux shell menu
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.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP