[Gllug] More grep stuff
Dylan
dylan at dylan.me.uk
Fri Sep 10 20:23:18 UTC 2004
Hi All,
In my quest to extract tag info from ogg files, I have encountered
another problem...
oggenc allows multiple comment arguments, so I figured I would:
for comment in `ogginfo <file> | grep =
do
comments="-c \"comment\" "$comments
done
but this produces, for example:
-c "TRACKNUMBER=7" -c "Love" -c "In" -c "Not" -c "TITLE=Im" -c
"KDE-ENCODER=kio_audiocd" -c "GENRE=" -c "DESCRIPTION=" -c
"ARTIST=10cc" -c "ALBUM=Milestones"
instead of:
-c "TRACKNUMBER=7" "TITLE=Im Not In Love" -c "KDE-ENCODER=kio_audiocd"
-c "GENRE=" -c "DESCRIPTION=" -c "ARTIST=10cc" -c "ALBUM=Milestones"
Obviously, any of the comments can have spaces in the rhs, but I can't
figure out how to get the lines with spaces to come out complete. I'm
especially confused since:
music at audio:/media/music/test> ogginfo 10*.* | grep TITLE
TITLE=Im Not In Love
music at audio:/media/music/test> echo `ogginfo 10*.* | grep TITLE`
TITLE=Im Not In Love
music at audio:/media/music/test> c=`ogginfo 10*.* | grep TITLE`; echo $c
TITLE=Im Not In Love
music at audio:/media/music/test>
Any comments?
Dylan
--
"I see your Schwartz is as big as mine"
-Dark Helmet
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list