I suggest you ...

[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
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
mr.xyz shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base