Although i've started to tinker with scripting i've hit a brick wall when it comes to menus, I would like something like this....

menu 1

1, suspend/unsuspend user
2, blah
3, blah
4, blah

when user selects 1 I want another menu to open saying

0, main menu
1, suspend user
2, unsuspend user

when user selects 0 they're returned to menu 1

when user selects 1 I want Please Enter Username: and after it's entered i'd like the command passwd -l to be run on the user and the output to be displayed. Then returned to suspend/unsuspend user menu.

when user selects 1 I want Please Enter Username: and after it's entered i'd like the command passwd -u to be run on the user and the output to be displayed. Then returned to suspend/unsuspend user menu.

Hope this makes sense and i'm sure it's not as hard as i've made out ha! any help would be appriciated

thanks for that very helpful. Can you tell me how to allow for user input after selecting sususer ie selet 1) sususer which returns 'enter username' which is then entered and output is dispalyed, also how do i get space inbetween titles ie Suspend User? this is what i have so far.

As far as spacing goes, are you referring to adding a blank line between each menu item or using phrases with spaces as menu items? I think you're trying to use spaced phrases as menu items. Use single quotes like this:

Who is online

Users browsing this forum: No registered users and 11 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum