Skip to content

Instantly share code, notes, and snippets.

@MitchRatquest
Last active June 13, 2016 18:15
Show Gist options
  • Save MitchRatquest/d74df75ede89befdd4e6f0e640ef0b0e to your computer and use it in GitHub Desktop.
Save MitchRatquest/d74df75ede89befdd4e6f0e640ef0b0e to your computer and use it in GitHub Desktop.
#!/bin/sh
#use as get_externals.sh TWITTERACCOUNT USERNAME PASSWORD
#account is public but i dont wanna share it
mkdir externals && cd externals
wget -O temphtml https://twitter.com/$1 && grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' temphtml > ips && rm temphtml
read -r ipaddress < ips
wget -m ftp://$2:$3@$ipaddress/share/pd/*
#mv * ~/externals #THIS LINE DOESN"T WORK
rm ips
echo "now move these files to the correct directory under ~/pd-externals"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment