[bash (Linux/*nix/Cygwin)] 'wzsget': short 4-liner to d/l mp3 samples off WZS
It only needed me 4 lines to write a short simple bash 4-liner that can (w)get me the samples I need to download to my HDD. Thought I'd share it here. Cut and paste and name it 'wzsget' or 'wzsget.sh' if you insist.
USAGE: wzsget <number>
So if you're l33t, 'wzsget 31337' will get you sample #31337.
!/bin/bash
destfile=$(wget http://www.watzatsong.com/en/name-that-tune/$1.html -O- -q | awk '/big.sample=/{print}' | grep -o 'http[^"]')
wget -q $destfile -O $1.mp3
echo -e "Downloaded $destfile to current directory.\nFile saved as $1.mp3."
1
vote
mr.xyz
shared this idea