> Does anyone know if it's possible to script telnet or ftp sessions?

   Sure, another one of the uses of standard I/O redirection.  First, read
up on telnet and ftp and see what options you can pass on the command line. 
Then, simply create a text file with the commands you want.  For example:

ftp ftp.golgotha.net < download-script.ftp > ftplog.txt

would run ftp to ftp.golgotha.net.  FTP would then redirect all of its
output to ftp.log.txt (in case you want it later) and would take all of its
input from the file download-script.ftp.  Download-script.ftp could contain
something like:

 - - Snip - -
anonymous
[EMAIL PROTECTED]
binary
hash
prompt
cd /pub/debian/dists/potato/main/disks-i386/current/doc
mget install.en.txt
bye
 - - Snip - -

   That would redirect the contents of that file into the ftp program.  The
first two lines log in (this could also be done with .netrc (see "man ftp"))
and the rest executes one command per line.

   Similar redirection techniques work with telnet and all other programs
that handle their input with standard I/O.

-- 
 Regards,                | Dear Diary: I recompiled my OS kernel today.
 .                       |
 Randy                   | Why?  Because with GNU/Linux, I can!
 ([EMAIL PROTECTED]) |

**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to