running interactive program from shell script
jaymo at cromagnon.cullmail.com
Sun Jan 30 03:35:29 PST 2005
I need a shell script that initiates a telnet session to another host. I have
come up with the following, but unfortunately it terminates when the script
is finished. What I wanted was for the telnet session to remain "alive" and
interactive until manually terminated.
Is there a way to accomplish this in a shell script?
I've been told that I'll have to use "expect" or similar to accomplish this,
but it seems to me that I should be able to do this using just Bourne shell
echo "ls -la";
) | telnet -l user 192.168.0.2
More information about the freebsd-questions