Created
March 25, 2015 16:11
-
-
Save prontiol/660680a661ea266aa14a to your computer and use it in GitHub Desktop.
Shell script for splitting pls playlist into single entry chunks
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
PLAYLIST=$1 | |
echo "Using file: $PLAYLIST" | |
N=`grep 'NumberOfEntries' $PLAYLIST | sed 's/^.*=//g'` | |
echo "Total entries: $N" | |
for ((i=1; i<=$N; i++)) do | |
PLAYLIST1="playlist$i.pls" | |
echo '[playist]' > $PLAYLIST1 | |
echo 'NumberOfEntries=1' >> $PLAYLIST1 | |
echo `grep File$i= $PLAYLIST | sed 's/^.*=/File1=/g'` >> $PLAYLIST1 | |
echo `grep Title$i= $PLAYLIST | sed 's/^.*=/Title1=/g'` >> $PLAYLIST1 | |
echo 'Length1=-1' >> $PLAYLIST1 | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank You !!