- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HPUX System Admin Menu interface
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
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
тАО05-24-2009 06:54 PM
тАО05-24-2009 06:54 PM
HPUX System Admin Menu interface
The question is at the main menu, when I selected the option , supposedly go through submenu. But can't and no functionality. Please see the screen and script as below
1) main menu
====================
Tue May 19 01:31:36 MYT 2009
Please Select:
A. DAILY LOGS CHECKING
B. USER-ID MANAGEMENT
C. MASTER OFF USER-ID
D. PRINTER MANAGEMENT
E. BACKUP
f. HOUSEKEEPING
g. PERFORMANCE MONITORING
h. SYSTEM INFO
I. OTHERS
J. Exit
Select by pressing the letter and then ENTER
script:
==========
#!/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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2009 07:25 PM
тАО05-24-2009 07:25 PM
Re: HPUX System Admin Menu interface
Your submenu code looks like this:
apick () { dailymenu.txt ; }
Is dailymenu.txt suppose to be a script? If so, it probably should end in .sh or .ksh, not .txt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2009 09:34 PM
тАО05-24-2009 09:34 PM
Re: HPUX System Admin Menu interface
Remove the while loop and run it
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 02:29 AM
тАО05-26-2009 02:29 AM
Re: HPUX System Admin Menu interface
if those *.txt files contains the submenu code then set they to executable:
# chmod +x *menu.txt
after that, you can run the submenu code like this:
apick () { ./dailymenu.txt ; }
However if they are really containing script code, it is best practice to rename them to *.sh or *.ksh
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2009 12:19 AM
тАО05-27-2009 12:19 AM