Wednesday, July 27, 2011

Telugu stream playlist - Extended m3u to simple m3u

PB passed on the following info.

cat 26th_JULY.m3u | sed /^#/d | tr '\\' '\n' | tr '\r' '\n' | sed '/\(.mp3\)\|\(.MP3\)\|\(.Mp3\)/!d' | sed 's/^/\/home\/sgh\/audio\//' > 260711.playlist.telugu


sed /^#/d Remove the lines starting with #

tr '\\' '\n' The windows path backslash (\) is changed to line feed

tr '\r' '\n' The Carriage return is changed to line feed

sed '/\(.mp3\)\|\(.MP3\)\|\(.Mp3\)/!d' Remove the lines not having .mp3 or .MP3 or .Mp3

sed 's/^/\/home\/sgh\/audio\//' Add the path /home/sgh/audio at the beginning of each line.




Added
tr '\r' '\n' on 26th July 2011.
The line used to end with both \r\n which made ices fail to start the playlist.

\r - Carriage Return - 0D in Hex
\n - Line feed - 0A in Hex

No comments:

Post a Comment