LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   shell scripting (https://www.linuxquestions.org/questions/programming-9/shell-scripting-908/)

bako 02-17-2001 06:01 AM

I'm wordering how powerfull shell scripting really is...

Like is it possible to perform the following task from out of a shell script ???

telnet some.machine.com;
enter user_id;
enter password;
execute some_command;
exit;

I tried just echoing the user id and password but after the telnet line my script wa waiting for input, and didn't carry on with the script :(

ugge 02-17-2001 11:12 AM

Shell scripting is very powerful and in your case most of what you would like to accomplish would be done by telnet it self, without the need of making a script. Read the man-page of telnet (man telnet).

To execute a command in telnet you probably would use > or < to redirect in-/output to telnet. (Might be the wrong order of > and <).


All times are GMT -5. The time now is 01:39 PM.