Created
October 11, 2020 18:32
-
-
Save dasider41/9e6b39d4ecde43d2aaa598bb7bed401e to your computer and use it in GitHub Desktop.
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/bash | |
while getopts h:u:p:t:d: flag | |
do | |
case "${flag}" in | |
h) host=${OPTARG};; | |
u) username=${OPTARG};; | |
p) password=${OPTARG};; | |
t) target=${OPTARG};; | |
d) destination=${OPTARG};; | |
esac | |
done | |
ftp -inv $host <<EOF | |
user $username $password | |
put $target $destination | |
bye | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment