[CLUE-Tech] more on recursive .mp3 playing

Jed S. Baer thag at frii.com
Fri Aug 30 08:06:22 MDT 2002


On Fri, 30 Aug 2002 06:47:35 -0600
Dave Price <davep at kinaole.org> wrote:

> find $1 | grep .mp3 | sort > mpr.lst
> I would have thought that the 'grep .mp3' pipe would eliminate directory
> names themselves, but when I use an argument like
> '/local/mp3/led_zeppelin' I wind up getting the empty directory names
> too; not just .mp3 files as expected.

Adding the "-type f" option to find will result in it returning only
"regular files".

[jbaer at priapas jbaer]$ find /tauceti/vbr/dave_brubeck/ 
/tauceti/vbr/dave_brubeck/
/tauceti/vbr/dave_brubeck/03.take_five.mp3
/tauceti/vbr/dave_brubeck/04.three_to_get_ready.mp3
/tauceti/vbr/dave_brubeck/05.kathy_s_waltz.mp3
/tauceti/vbr/dave_brubeck/07.pick_up_sticks.mp3
/tauceti/vbr/dave_brubeck/01.blue_rondo_ala_turk.mp3
/tauceti/vbr/dave_brubeck/02.strange_meadow_lark.mp3
/tauceti/vbr/dave_brubeck/06.everbody_s_jumping.mp3
[jbaer at priapas jbaer]$ find /tauceti/vbr/dave_brubeck/ -type f
/tauceti/vbr/dave_brubeck/03.take_five.mp3
/tauceti/vbr/dave_brubeck/04.three_to_get_ready.mp3
/tauceti/vbr/dave_brubeck/05.kathy_s_waltz.mp3
/tauceti/vbr/dave_brubeck/07.pick_up_sticks.mp3
/tauceti/vbr/dave_brubeck/01.blue_rondo_ala_turk.mp3
/tauceti/vbr/dave_brubeck/02.strange_meadow_lark.mp3
/tauceti/vbr/dave_brubeck/06.everbody_s_jumping.mp3

Noting that it will also filter out any sockets, [character|block]
special, named pipe, etc. files which you might have laying around in your
mp3^H^H^Hogg collection as well. ;-)

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