[plug] Using ogg meta-data in bash commands

Gregory Orange gregory.orange at gmail.com
Wed Mar 17 11:52:56 WST 2010

On 17 March 2010 11:43, Jason Posavec <jasonposavec at iinet.net.au> wrote:
> I have all my music in one directory (artist-title.ogg) so that my home
> media player can just randomly play any song in that directory all day.
> I want to copy all songs from a particular album (listed on the ogg
> meta-data) into a separate folder.
> Does anybody know how I'd do this with a bash command that can read ogg
> meta-data?

Hi Jason,
A quick search gave me
so perhaps that's a useful command line ogg meta-data reader. As for
bash'ing it together, I guess a dumb for loop, so something in the
realm of:

for i in /home/jason/music/*; do
  vorbiscomment -l $i | grep "album: My Favourite Album"
  if ( $? == 0 ) then
     cp $i /home/jason/favouriteAlbumFolder/


Gregory Orange

More information about the plug mailing list