Skip to content

Instantly share code, notes, and snippets.

@dasider41
Created October 11, 2020 18:32
Show Gist options
  • Save dasider41/9e6b39d4ecde43d2aaa598bb7bed401e to your computer and use it in GitHub Desktop.
Save dasider41/9e6b39d4ecde43d2aaa598bb7bed401e to your computer and use it in GitHub Desktop.
#!/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