Matt, that was a great explanation, but it still didn't seem to do the
trick. Now, using the IFS redefinition you gave, I get the entire
playlist sent to mpg123 as one filename, as far as I can tell from the
output I get. Here's my screen dump for you to ponder. I think I'll
just end up using mmv to replace spaces with underscores, and then
find/replace in the playlist. That works perfectly, but I'd hoped for
something magical and elegant. :-)
--screen dump follows--
for I in `cat lines.m3u`; do mpg123 "$I"; done
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Blondie-PL01-Hanging On The Telephone.mp3
Blondie-PL02-One Way Or Another.mp3
Blondie-PL03-Picture This.mp3
Blondie-PL04-Fade Away And Radiate.mp3
Blondie-PL05-Pretty Baby.mp3
Blondie-PL07-11-59.mp3
Blondie-PL08-Will Anything Happen.mp3
Blondie-PL09-Sunday Girl.mp3
Blondie-PL11-I'm Gonna Love You Too.mp3
Blondie-PL12-Just Go Away.mp3: No such file or directory
--end screen dump--
On 2 Apr, Matt Stegman wrote:
> OK, I think I got something that works. The $IFS seems to control bash's
> definition of whitespace. If you change it to include only tabs and
> newlines,
>
> IFS=$(echo -e \\t)
>
> then for loops won't separate filenames with spaces into separate
> objects. Meaning, you can run
>
> for I in `cat playlist.m3u`; ...
>
> without problems. You may, however, wish to set this back after you're
> done; it may (probably will) cause problems later.
--
-----------
Nil Carborundum Illegitimi
http://andysocial.com