[CLUE-Tech] mpg123 - recursively play directories? (solved?)

Jed S. Baer thag at frii.com
Mon Aug 26 18:41:14 MDT 2002


On Mon, 26 Aug 2002 17:31:52 -0600
Sean LeBlanc <seanleblanc at americanisp.net> wrote:

> > > > > ls -R | xargs mpg123 {}\;
> > 
> > What does the {}\; do?
> 
> Good question. In the above case, I think it's actually unneeded. In
> other cases, where you don't want the passed args to go at the end
> (default, apparently) you can use this as the default to be substituted
> with piped in list. I see in the xargs man page (on FreeBSD, anyway)
> that -J foo will set up foo as the thing to substitute for, also.
> 
> Of course, if you are using find anyway, -exec would always be an
> option, too. 

Except that -exec would then invoke mpg123 once for each file ...

Hey, that's what xargs is doing too. Man, I hate it when the brain goes on
strike. ;-)

Another discovery being that mpg123 is a symlink to mpg321 (on my RH7.2
box). Too bad it doesn't have an option to accept the playlist from
standard input. Hmmm, ...

find /path-of-mp3s -type f | mpg321 --[shuffle | random] --list /dev/stdin
-or-

find /path-of-mp3s -name '{pattern}' ...

AHA! Now I don't get a new mpg321 process each time I CTRL_C, but it still
skips to the next track.

jed
-- 
We're frogs who are getting boiled in a pot full of single-character
morphemes, and we don't notice. - Larry Wall; Perl6, Apocalypse 5



More information about the clue-tech mailing list