Desperate for help with menu coding

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Desperate for help with menu coding
# 15  
Old 12-11-2007
I know I am new to this forum and I dont want to rock the boat but.......

this is your third thread about this problem, sorry but it sounds like a homework problem.

if it is a homework problem then this may not be the best place to look for answers.

if you need this for work them you may be out of your depth in your job, if your job needs shell scripting skills then you may have a big learing curve.

you cant expect people on the forum to give you a finished script to solve your problems.

I hope I havent over stepped the mark....
# 16  
Old 12-11-2007
Originally Posted by robsonde
it sounds like a homework problem.
I think the deadline is looming as well. Smilie
# 17  
Old 12-11-2007

This is great! I am making significant progress. Here is the new code:


while true; do

Menu of Options

1. Display all files in a user's home directory
2. Welcome yourself to the program
3. Display System Information
4. Exit back to Windows

echo Please enter your choice:
read option
case "$option" in

   ls -l
   echo welcome
   uname -a
   echo "Use 1, 2, 3, or 4"

Now, when I select Option #4 it does not exit the program. I need to shut down the connection completely and return to Windows. Right now, it's just going to my home directory.
# 18  
Old 12-11-2007
Gee, thanks for the input robs.
# 19  
Old 12-11-2007
Originally Posted by sinjin
Now, when I select Option #4 it does not exit the program. I need to shut down the connection completely and return to Windows. Right now, it's just going to my home directory.
A while back in an earlier post I asked what does "Exit to Windows" mean?

What does an AIX box know or care about you and Windows?
# 20  
Old 12-11-2007
It means that executing/choosing that option quits the connection to the Unix server, closes the command prompt window, and returns the user to the Windows desktop.
# 21  
Old 12-11-2007
Assuming your script is called "" and is in the current directory AND you have the while true/do/done loop setup.

then try...

. ./


exec ./

However, on an AIX box I would not have an option that says Exit to Windows because AIX has no control over what client you are calling from. If I use ssh from a Macintosh, should I still see "Exit to Windows"?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Gnome 3.28.3 menu item dissapears under the system menu

I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome. Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies

2. UNIX for Beginners Questions & Answers

UUCP HELP for a desperate new user

Hello, I have a unique situation where I must pass along critical & time-sensitive emails to a group of seven different people. Every person with whom I communicate EXCEPT ONE uses a standard IP based ".com" email address. The one exception is a gentleman who will NOT budge and create a... (1 Reply)
Discussion started by: Bell02
1 Replies

3. SCO

Desperate for SCO OpenServer 5.0.6 ISO

Is anyone able to help. Desperately trying to virtualise an ageing Pecase system on SCO 5.0.6 (2 Replies)
Discussion started by: ElGato
2 Replies

4. Shell Programming and Scripting

csh desperate help...

Hi guys, I am really newbie of csh and I am stuck with a script. Basically what I want to do is assign to a variable (array) the output of "ls". Then look at this array and if there is the word "my_file", delete it from the array and echo the new array. Moreover, I would like to have that... (8 Replies)
Discussion started by: Mandrake83
8 Replies

5. Shell Programming and Scripting

Simple Menu and coding

I am very new to Unix and don't know much about it. I've been trying to create a menu and what I don't understand is how to execute a command once a user makes a selection. I have the menu set up. In fact, the following is the code that I have thus far: #! /bin/csh # This is the UNIX menu... (0 Replies)
Discussion started by: sinjin
0 Replies

6. UNIX for Dummies Questions & Answers

Please help me decipher this header - I'm desperate!

I've got a really weird situation here.... the same IP address keeps popping up in porn spam that I have rec'd in 2 different email accts. It looks to me like it's coming from UC Davis, and I suspect someone there, so I am hoping you all can verify the same thing before I call the person on this... (0 Replies)
Discussion started by: christinef
0 Replies

7. Shell Programming and Scripting

perl odbc... need desperate help!

Hey guys: Can anyone show me , how I can update mulitple fields in a database (sample Informix) using Win32::ODBC ? I'm creating a script that accepts an array as the value and then inserts these values into all the table fields in a particular database... Thanks for anyone who can... (2 Replies)
Discussion started by: jfsuminist
2 Replies

8. UNIX for Advanced & Expert Users

Please Help.... Desperate need! Hard Question!

I know pipelined processors have issues with interupts.... but why? And does the architecture of the CPU affect the kind of software that can run on it? If someone could help me out that would be awsome. My boss came to me with this question and I can't find anything on the web helping me out.... (1 Reply)
Discussion started by: Sparticus007
1 Replies

9. UNIX for Dummies Questions & Answers

I am confused and desperate

Hello, For a time now I have this problem which I cannot solve and this bothers me cause it seems so simple. I have to change an existing (ftp only)user to create a timeslot for this user. (e.g. he can only login between 8 and 10 PM). Facts: - I can only use a terminal client (no gui) -... (1 Reply)
Discussion started by: derk
1 Replies
Login or Register to Ask a Question