LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Bash Menu (https://www.linuxquestions.org/questions/programming-9/bash-menu-91214/)

cj2001 09-10-2003 08:03 AM

Bash Menu
 
I am very new to LINUX and Bash and what I would like to do is using BASH create a simple text menu that would allow me to add and delete a user.

jpbarto 09-10-2003 08:37 AM

ok so what do you need help with?

to read in a value use 'read' ... to output use 'echo' ...

UltimaGuy 09-10-2003 08:50 AM

Just go here : http://www.tldp.org/LDP/abs/html/ and you will learn a great deal about bash.

cj2001 09-10-2003 09:38 AM

Menu
 
I understand the I need to use the useadd and the userdel commands to add a user and delete a user but what I am not understanding is how you create the text menu. Is there somewhere I can go and see a sample of a menu?

jpbarto 09-10-2003 09:44 AM

cat <<++
--- MAIN MENU ---
1) Create New User
2) Edit Existing User
3) Delete User

Please enter your selection:
++

read menuchoice
echo You chose menu option $menuchoice

cj2001 09-10-2003 12:55 PM

Thank You
 
Thanks, I will see if I can work with this. Now all I need to figure out is the programing behind the menu. Thanks again :study:

unSpawn 09-10-2003 01:36 PM

If you don't want to do that you could always try using "dialog".

cj2001 09-11-2003 07:44 AM

Dialog? I am not sure I understand. :confused:

jpbarto 09-11-2003 09:28 AM

cj2001, did some googling and came across this. Apparently Dialog is a redhat utility for creating 'DOS'like interfaces ... here's a tutorial check it out...

http://www.freeos.com/guides/lsst/ch04sec6.html
http://www.freeos.com/guides/lsst/ch04sec7.html


All times are GMT -5. The time now is 05:41 AM.