Quantcast
Channel: Sud's Blog
Viewing all articles
Browse latest Browse all 12

Scripting FTP in BASH

$
0
0
The following code snippet can be embedded in a bash script to ftp a file or script other ftp functions. It also includes error checking if the ftp of the file fails.function ftpfile { # failure or success flag # FLAG=0 # assume success # Start the actual ftp of the file RETUR=$(ftp -n <>${LOGFILE} open $SERVER user $USERNAME $PASSWORD ascii put file.txt

Viewing all articles
Browse latest Browse all 12

Trending Articles