SciLor's Open Source Forums

Unix: Bash download script
Page 1 of 1

Author:  urmeli [ Sat Jul 30, 2011 3:20 pm ]
Post subject:  Unix: Bash download script

hi all,

i coded a little download script which might help you batch-downloading several files at once. copy it into the directory where the jar-file resides and just run it by typing ./ (dont forget to chmod u+x) and then enter your search string.
as a result you get the song list. you can then for example type 1-6,9-13 to download the files 1 to 6 and 9 to 13. single numbers seperated by commas are also possible. hope it helps :)

echo Search:
read string
java -jar SciLorsJGroovesharkDownloader.jar /c /l "$string"
echo "Download index (e.g. 1-5 or 2,3,5):"
read number

   echo $len
   unset IFS
   echo ${array[0]}
   echo ${array[1]}
   while [ $i -lt $len ]
      if `echo ${array[$i]} | grep "-" 1>/dev/null 2>&1`
         echo start
         echo $start
         echo stop
         echo $end
         while [ $start -le $end ]
            echo $start
            java -jar SciLorsJGroovesharkDownloader.jar /c /d "$string" "$start"
                      start=`expr $start + 1`
         unset IFS
         java -jar SciLorsJGroovesharkDownloader.jar /c /d "$string" "${array[$i]}"

have fun, tobi

Author:  SciLor [ Sat Jul 30, 2011 3:26 pm ]
Post subject:  Re: bash download script

Thank you for posting your script here, it will be useful for all users :).

Could you translate the echos into english? Then I will make it sticky in the forum.

Author:  urmeli [ Sat Jul 30, 2011 3:40 pm ]
Post subject:  Re: bash download script


Author:  groove098 [ Sun Oct 30, 2011 2:49 pm ]
Post subject:  Re: Unix: Bash download script


SciLorsJGrooveSharkDownloader.jar and
SciLorsJGroovesharkDownloader.jar are different files. Please fix this in the right name.

Author:  mastropiero90 [ Sat Aug 09, 2014 8:02 pm ]
Post subject:  Re: Unix: Bash download script

I'm running linux mint 17.
I can download a single song , but fails if I try to input an interval

26. De-Phazz - Rock & Roll Dude - Days of Twang
27. De-Phazz - Devil's Music (Reprise) - Days of Twang
Download index (e.g. 1-5 or 2,3,5):
./gdown: 10: ./gdown: Syntax error: "(" unexpected

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group