Is there a way to shebang-ify ftp and write small ftp scripts?
For example:
#!/usr/bin/ftp
open 192.168.1.1
put *.gz
quit
Any thoughts?
|
Is there a way to shebang-ify ftp and write small ftp scripts? For example:
Any thoughts? |
|||
|
|
|
Not with the You can use a here document to pass a script to
Lftp accepts a script name passed as an argument.
Ncftp comes with two tools Zsh includes an FTP module. Using a proper shell rather than a straight FTP script has the advantage that you can react to failures.
Of course there are plenty of other languages you could use: Perl, Python, Ruby, etc. Another approach is to mount the FTP server as a directory, and then use Note that if you were planning to use authentication (likely if you're uploading), and you have control over the server, you'd be better off with SSH access. It's more secure and more flexible. To copy files over SSH, you can use |
||||
|