Meun based shell - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: How Do I? (https://www.linux-noob.com/forums/forum-60.html) +--- Thread: Meun based shell (/thread-891.html) |
Meun based shell - magikman - 2008-07-17 Howdy, I am writing a shell script for users with no knowledge of UNIX. The script will be used as their shell and will give them options on things to do/execute. I need to allow them to telnet, ssh, etc. to devices. The following is what i have so far: Code: #!/bin/sh The problem i am having is that after remoting into another box, i lose the shell script as the shell when they come back. If anyone has any suggestions, i am all ears (znx). Meun based shell - anyweb - 2008-07-18 if i was writing a script like this in windows (batch file) i'd use a call statement to 'call' another command (like ssh) and once it is completed it returns control to the original script dunno how to do that in linux though, Meun based shell - hybrid - 2008-07-18 I'm not sure if this would work, and can't verify it right now, but wouldn't it work to just call your internal menu procedure after finishing the external command? Such as... Code: _ssh () According to http://www.unix.com/shell-programming-scri...nal-script.html, control should be returned to your script after running the external command, so you just need to catch that and push them back to the menu, in theory. Meun based shell - magikman - 2008-07-21 Yes, calling the menu again will work. |