Skip to content

Instantly share code, notes, and snippets.

@vik-y
Created December 30, 2014 13:52
Show Gist options
  • Save vik-y/7104c53cbbcf8a4b9de5 to your computer and use it in GitHub Desktop.
Save vik-y/7104c53cbbcf8a4b9de5 to your computer and use it in GitHub Desktop.
Shell Script to Transfer 2 files to an ftp server
#!/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