James Wilkinson writes:
>
> I want to write a command file that will telnet to a Unix server and then
> run a script. I can't figure out how, though. I tried building a file of
> commands and running Telnet with the file as stdin. This worked until the
> connection to the remote machine was made. No input from stdin is read
> again until the connection ends.
>
> How can I automate things after that point? Any help would be appreciated.
If you're on 5.5, then Perl/iX is well suited to this kind of work. You can
use Perl to manually make a TCP connection to the Unix server's port 23
(telnet), or you can use the Comm.pl CPAN module for a more automated "if login:
prompt then send password" kind of solution.
http://www.cccd.edu/~markb/perlix.htmlhttp://www.perl.com/CPAN-local/modules/by-module/Comm.pl/ERICA/
You will not be using telnet.arpa.sys at all.
--
Mark Bixby E-mail: [log in to unmask]
Coast Community College Dist. Web: http://www.cccd.edu/~markb/
District Information Services 1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)