Wednesday, 14 August 2013

automating FTP session

automating FTP session

I have the following perl script to automate an FTP session, I'm hoping
someone can explain how it works.
system("rsh some_server ftp -in ftp.something.com << !
user anonymous someone\@somewhere.org
some ftp commands
bye");
The background. This perl script runs on a Linux machine, it remotes into
a Solaris machine. The FTP session must be executed from the Solaris
machine because the FTP site performs IP address checking.
Formerly this script ran on the Solaris machine directly (i.e. it didn't
use rsh) I hacked it around and came up with this which seems to work.
However I have little idea how, in particular I don't understand the << !
bit at the end of the first line. It looks a little like a here-document
but I'm not really sure.
Any explanations welcome.

No comments:

Post a Comment