09-12-2002
Maybe you can try this simple menu (this is origanally for AIX)
#
# Main loop
#
while [ 1 ]
do
cat <<-EOT
1. start programm 1
2. start programm 2
3. start programm 3
type exit to quit
EOT
echo " Enter your choice: \c"
read choice
case $choice in
1) start_programm_1.sh
;;
2) start_programm_2.sh
;;
3) start_programm_3.sh
;;
exit) clear
echo "\nEnd of session...\n"
exit 0
;;
*)
echo "\007\007\007\c"
echo "\n This choice does not exist, please choose another one ! \c"
sleep 2
;;
esac
done
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
Hi All,
this small script is written to recognize user input character.. it is in small case .. upeer case or is a number... but when i input first capital letter say A.. it always gives small character.... what is the problem.
#!/bin/bash
echo "Enter the character"
read a
case $a in
)... (2 Replies)
Discussion started by: johnray31
2 Replies
3. Shell Programming and Scripting
In a case statement like below :
case $rental in
"car") echo "For $rental Rs.20 per k/m";;
"van") echo "For $rental Rs.10 per k/m";;
"jeep") echo "For $rental Rs.5 per k/m";;
"bicycle") echo "For $rental 20 paisa per k/m";;
*) echo "Sorry, I can not gat a $rental for you";;... (4 Replies)
Discussion started by: sriram003
4 Replies
4. Shell Programming and Scripting
echo -e "Select: \c"
read IN
pattern="1-20"
case $IN in
)
echo "Selected: $IN"
;;
*)
echo "Invalid selection: $IN"
;;
esac
# sh test
Select: 10
Invalid selection: 10
# sh test
Select: 2 (6 Replies)
Discussion started by: Ikon
6 Replies
5. Shell Programming and Scripting
I am writing a bash script that asks the user for input and I need it to repeat until the user selects quit.. I dont know how to write the loop for it I searched all over but i still do not get it.. if anyone could help with this it would be greatly apprciated here is my script so far:
#!... (2 Replies)
Discussion started by: Emin_Em
2 Replies
6. Shell Programming and Scripting
I'm in the process of writng a function that consists of a case statement is there a way of calling the function and passing a value to it?
ie
function1 () {
case
opt1 do .....
opt2 do.....
esac
}
function opt1
I'm aware the syntax is not correct, but you get the general idea. (1 Reply)
Discussion started by: squrcles
1 Replies
7. Shell Programming and Scripting
have written the below code to check whether the string received from user is a file name or dir using case statement, but its going into default case*).
#!/bin/sh
#Get a string from user and check whether its a existing filename or not
rm str2
rm str3
echo "enter a file \c"
read fil... (8 Replies)
Discussion started by: Mohan0509
8 Replies
8. Shell Programming and Scripting
Hi Gurus,
I have a very weird requirement and have no clue to resolve the issue. please help me get out this difficulty
below two tables, table1 contains the column name. D means this column used for the rule. for example: rule 0 is all columns have value, rule1 is col3 and col7 have no value.... (2 Replies)
Discussion started by: Torhong
2 Replies
9. Shell Programming and Scripting
Foe example we have three environments int,qa and prod.Each environment has some number of servers.
int=Server1,Server2,Server3
qa=Server4,Server5,Server6
prod=Server7,Server8,Server9
echo "Enter the Environment i.e int,qa,prod"
read env
case $env in
int)
## Need command where all the... (9 Replies)
Discussion started by: nareshreddy443
9 Replies
10. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT HPUX
xmremovefrompostfromlist
XmRemoveFromPostFromList(library call) XmRemoveFromPostFromList(library call)
NAME
XmRemoveFromPostFromList -- a RowColumn function that disables a menu for a particular widget
SYNOPSIS
#include <Xm/RowColumn.h>
void XmRemoveFromPostFromList(
Widget menu,
Widget post_from_widget);
DESCRIPTION
XmRemoveFromPostFromList makes a Popup or Pulldown menu no longer accessible from a widget. This function does not destroy a menu, or deal-
locate the memory associated with it. It simply removes the widget from the menu's list of widgets permitted to post that menu.
If the menu argument refers to a Popup menu, the event handlers are removed from the post_from_widget widget. If the argument refers to a
Pulldown menu, its ID is removed from the XmNsubMenuId of the specified post_from_widget. Also, if the menu is a Pulldown menu, the
post_from_widget widget must be either a CascadeButton or a CascadeButtonGadget.
menu Specifies the widget ID of a the Popup or Pulldown menu to be made inaccessible from the post_from_widget widget.
post_from_widget
Specifies the widget ID of the widget which can no longer post the menu referred to by the menu argument..
For a complete definition of RowColumn and its associated resources, see XmRowColumn(3).
RELATED
XmAddToPostFromList(3), XmGetPostedFromWidget(3), and XmRowColumn(3).
XmRemoveFromPostFromList(library call)