Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
rwget: wget through ssh tunnel
#!/usr/bin/env sh
# TODO: replace and path_to_your_rwget_folder
if [ $# -lt 1 ] ; then
echo "usage: rwget URL"
exit 1
filename=`ssh URL=$1 'bash -s' << 'ENDSSH'
cd path_to_your_rwget_folder
wget -q --no-use-server-timestamps $URL
ls -t | head -n 1
scp${filename} .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.