Discussion Locked

passing arguments to telnet

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm trying to pass arguments to telnet within a shell script, and it doesn't work. Can anyone help me??? Here is a sample of what I'm doing:
telnet host1 << LABEL1
username
password
command1
command2
exit
LABEL1

with other programs like ftp, ypinit, etc
it's working but not with telnet!!!???

Thanks

5 replies

by insatiable

I can't tell you how to pass the arguments because I couldn't figure it out when I needed it....
BUT my solution was to create an alias in the .cshrc that would run a script (or a command)
Example:
Put this in the .cshrc
alias la 'ls -la'
Then, use the la in your shell script for the telnet.
I hope that helps!! Good luck!
Melissa

This discussion is closed to new replies.