The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help with script for menu sinjin Shell Programming and Scripting 0 12-10-2007 12:27 PM
Phone menu Dawg101 Shell Programming and Scripting 1 05-27-2007 10:12 AM
Menu space Shell Programming and Scripting 5 03-02-2005 03:05 AM
CDE menu gabim AIX 1 10-20-2003 03:17 AM
Menu script Ypnos Shell Programming and Scripting 9 07-02-2003 01:25 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 01-14-2002
Jimbo
Guest
 

Posts: n/a
Your code is calling Filefunctions, and that procedure name is missing the letter n.
Forum Sponsor
  #9  
Old 01-14-2002
Registered User
 

Join Date: Dec 2001
Location: UK, England
Posts: 45
Jimbo thats just a typin error from when I was copyin it, i didnt do that on my script in unix Do u know what I can add to MY code in order for it to function with sub menu's?

Last edited by Makaveli.2003; 01-14-2002 at 08:09 AM.
  #10  
Old 01-14-2002
Jimbo
Guest
 

Posts: n/a
Exactly what are trying to make your menu do regarding subdirectories?
  #11  
Old 01-14-2002
Registered User
 

Join Date: Dec 2001
Location: UK, England
Posts: 45
Quote:
I have designed a script menu, but I would like to to create sub menus e.g. I have my normal menu, then have a few options, and I for example choose option 2 and I would like it to take me to a whole new page (well, clear the screen) then allow me to choose from 5/6 options, which are functional. Dunno if that is clear but, ill give u an example:

Usual menu appears with 6 options e.g.

1. File functions
2. Directory functions
3. -
4. -
5. -
6. -

And say I choose option 1, I would like it to clear the screen and take me to a new sub-menu e.g.

1. Delete
2. Copy
3. Remove
etc
  #12  
Old 01-14-2002
Registered User
 

Join Date: Dec 2001
Location: UK, England
Posts: 45
Quote:
I have designed a script menu, but I would like to to create sub menus e.g. I have my normal menu, then have a few options, and I for example choose option 2 and I would like it to take me to a whole new page (well, clear the screen) then allow me to choose from 5/6 options, which are functional. Dunno if that is clear but, ill give u an example:

Usual menu appears with 6 options e.g.

1. File functions
2. Directory functions
3. -
4. -
5. -
6. -

And say I choose option 1, I would like it to clear the screen and take me to a new sub-menu e.g.

1. Delete
2. Copy
3. Remove
etc
  #13  
Old 01-15-2002
Registered User
 

Join Date: Dec 2001
Location: UK, England
Posts: 45
This is my menu script so far:
!/bin/ksh

amenu () {

clear
echo `date`
echo
echo "\t\t\tMy Personal Menu"
echo
echo "\t\tPlease Select:"
echo
echo "\t\t\t 1. Directory display"
echo "\t\t\t 2. Current Activity"
echo "\t\t\t 3. Who is logged on"
echo "\t\t\t 4. File functions"
echo "\t\t\t 5. Directory functions"
echo "\t\t\t 0. Exit"
echo Select by pressing a number and then ENTER ;
}

PressEnter () {
echo Press Enter
read x
}


DirectoryDisplay () {
ls -l|more
PressEnter
}

CurrentActivity () {
ps -ef|more
PressEnter
}

WhoIsLoggedOn () {
who|more
PressEnter
}

Filefunctions () {
?????????????????????????????
PressEnter
}

Directoryfunctions () {
?????????????????????????????
PressEnter
}

while true
do

amenu

read answer

case $answer in
1) DirectoryDisplay ;;
2) CurrentActivity ;;
3) WhoIsLoggedOn ;;
4) Filefunctions ;;
5) Directoryfunctions ;;

0) break ;;
esac

done
clear

-----

Jimbo, how would I go about adding to my script so that it to do this: I for example choose option 4 and I would like it to take me to a whole new page (well, clear the screen) then allow me to choose from 5/6 options, which are functional. Dunno if that is clear but, ill give u an example:

Usual menu appears with 6 options e.g.

1. -
2. -
3. -
4. File functions
5. Directory functions
6. -

And say I choose option 4, I would like it to clear the screen and take me to a new sub-menu e.g.

1. Delete
2. Copy
3. Remove
etc ^^the above functions need to be functional

Can ne1 help????
  #14  
Old 01-15-2002
Jimbo
Guest
 

Posts: n/a
You just need to add code in Filefunctions () and Directoryfunctions () to paint the sub-menu, read answer, and a case statement to process, just like you are doing now for your main menu. Nothing new, just more of the same.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:38 PM.


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