Skip to content

Instantly share code, notes, and snippets.

@haosdent
Created November 6, 2015 13:47
Show Gist options
  • Save haosdent/cd0a1f7b00e850250ead to your computer and use it in GitHub Desktop.
Save haosdent/cd0a1f7b00e850250ead to your computer and use it in GitHub Desktop.
download_file.sh
#!/usr/bin/env bash
FILE_PATH=$(readlink -e $1)
SSH_CONNECTIONS=(${SSH_CONNECTION})
SERVER_HOST=${SSH_CONNECTIONS[2]}
SERVER_PORT=${SSH_CONNECTIONS[3]}
echo download_file ${SERVER_PORT} ${USER}@${SERVER_HOST}:${FILE_PATH}
@haosdent
Copy link
Author

haosdent commented Nov 6, 2015

sudo wget --no-check-certificate https://gist.githubusercontent.com/haosdent/cd0a1f7b00e850250ead/raw/80999218d82647447ed7e86fcb6ed6ef32188633/download_file.sh -O /usr/bin/download_file.sh
sudo chmod a+x /usr/bin/download_file.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment