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.
|
ok so what do you need help with?
to read in a value use 'read' ... to output use 'echo' ... |
Just go here : http://www.tldp.org/LDP/abs/html/ and you will learn a great deal about bash.
|
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?
|
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 |
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:
|
If you don't want to do that you could always try using "dialog".
|
Dialog? I am not sure I understand. :confused:
|
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. |