mikshaw


Group: Members
Posts: 4856
Joined: July 2004 |
 |
Posted: Jan. 31 2007,20:04 |
 |
while read line; do commands done < playlist
I still have very little idea of what you're trying to accomplish, but the above inputs lines literally. The cat command should do the same, so I'm thinking there is a problem with the way poc or mpg321 is reading the input. I have an mpg321 script that also didn't work with spaces in filenames, but wrapping the variable which represents the filename in quotes fixed the problem:
Code Sample | find ${DIR} | while read song; do case "$song" in *.mp3|*.Mp3|*.MP3) ${MP3_PLAYER} $@ "$song" && sleep 1 && clear;; *.ogg|*.Ogg|*.OGG) ${OGG_PLAYER} $@ "$song" && sleep 1 && clear;; esac; done
|
Of course this runs a unique instance of mpg321 for each song rather than using a playlist, but the point is that I needed the filename in quotes.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|