LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Menu instead of shell for a specific user in ssh? (https://www.linuxquestions.org/questions/linux-software-2/menu-instead-of-shell-for-a-specific-user-in-ssh-181534/)

jon_k 05-14-2004 06:39 PM

Menu instead of shell for a specific user in ssh?
 
I remember a long time ago someone gave me access to restart his chat server (Wasn't irc)

I telnetted in

it gave me a menu like:

Press the appropriate key:
1 - shutdown server
2 - start server
3 - restart server
4 - clear props file
5 - restore pat file


Now later on I ended up creating a chat server myself -- it definately didn't come with such stuff to do that (create a customized limited crappy shell)


I'm now interested in such, in where, a user can get a menu and select an option -- when the option is selected it will execute the corresponding BASH script, program, or whatever.


How could I customize a telnet session to do this and show such a menu when they log in rather than a shell prompt?

Thanks
Jon

jschiwal 05-14-2004 07:04 PM

Read the info file for bash. There is a command called select which presents a menu of options for the user to select.


All times are GMT -5. The time now is 01:33 AM.