The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
dialog menu script. please HELP claudlu Shell Programming and Scripting 2 05-04-2008 07:11 AM
Creating a menu within a script file sinjin Shell Programming and Scripting 8 12-09-2007 10:18 PM
Menu Script question lanmanb4 UNIX for Dummies Questions & Answers 2 07-28-2005 07:08 AM
Menu script Ypnos Shell Programming and Scripting 9 07-02-2003 01:25 PM
Changing korn shell script text Menu colors? darthur UNIX for Dummies Questions & Answers 6 01-20-2002 04:15 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-10-2007
Registered User
 

Join Date: Dec 2007
Posts: 22
Unhappy Need help with script for menu

I'm working on a script for a basic menu with four options. The first option for the menu asks a user to put in anyone's user name and is supposed to display the user's home directory. If a user does not enter a name, then their own home directory should be displayed. The second menu option is to prompt a user for their name and then send a welcome message with that same name. I am having a very, very hard time figuring out how to code the actual menu input. I am very new to Unix and find all this quite daunting. Here is the code that I have so far:


#! /bin/csh
# This is the UNIX menu script file that is for the second part of the
# take-home final.

cat <<ENDINPUT

CISS 125
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

ENDINPUT
echo Please enter your choice:
read option

case $option
1)


I'm not sure at all what to do next. I'd appreciate it if someone would please point me in the right direction. I'm guessing that I'm going to have to create another variable/read for the first menu option since the user had to input a name and that has to be read.
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0