[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: unattended ftp



> | Excuse if this is a FAQ, but how can I set up a shell script to ftp to a
> | host and retrieve a file?
> 
> If you install ncftp, you get a program called ncftpget that can be
> used to get files non-interactively (eg in a script).

Not necessaraly with ncftp, plain fto will do. In a script:

#!/bin/sh

ftp -i -n <host> <<EOI
user <userid> <passwd>
cd /some/dir
bin
get somefile save/file/name
bye
EOI


Alex Y.
-- 
   _ 
 _( )_
(     (o___           +-------------------------------------------+
 |      _ 7           |            Alexander Yukhimets            |
  \    (")            |       http://pages.nyu.edu/~aqy6633/      |
  /     \ \           +-------------------------------------------+


Reply to: