Last active
November 30, 2019 21:10
-
-
Save colindekker/8b461e492785dc4a055c5d4e866f0d1f to your computer and use it in GitHub Desktop.
History Of Hardcore Gabber 1992-2000 playlist download shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------------ | |
# wget -O - https://gist.githubusercontent.com/colindekker/8b461e492785dc4a055c5d4e866f0d1f/raw/ | bash | |
# ------------------------------------------ | |
INPUT=mp3.csv | |
mkdir "$HOME/mp3" | |
cd "$HOME/mp3" | |
curl "https://gist.githubusercontent.com/colindekker/7446842082b5098a633cef846d6faf7b/raw" --output $INPUT | |
#MP3_COUNT=1 | |
OLDIFS=$IFS | |
IFS=',' | |
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } | |
while read Url | |
do | |
echo "Url : $Url" | |
MP3_PREFIX="$(printf %03d $MP3_COUNT)" | |
MP3_NAME="$(echo $Url | rev | cut -d '/' -f1 | rev)" | |
#MP3_NAME="$($MP3_PREFIX - $MP3_NAME)" | |
echo $MP3_NAME | |
# wget -O $MP3_NAME $Url | |
curl $Url --output $MP3_NAME | |
done < $INPUT | |
IFS=$OLDIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment