Created
December 30, 2014 13:52
-
-
Save vik-y/7104c53cbbcf8a4b9de5 to your computer and use it in GitHub Desktop.
Shell Script to Transfer 2 files to an ftp server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HOST='' | |
USER='' | |
PASSWD='' | |
ftp -n $HOST <<END_SCRIPT | |
user $USER $PASSWD | |
binary | |
cd / #Location of your directory | |
put $1 /#Command line argument 1 - file name | |
put $2 /#Command line argument 2 - file name | |
bye | |
END_SCRIPT | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment