also sprach Derrick 'dman' Hudson <dman@dman.ddts.net> [2002.07.21.2044 +0200]: > On Sun, Jul 21, 2002 at 05:35:34PM +0200, martin f krafft wrote: > | is there a /usr/bin/id3 equivalent to editing the comments in Ogg > | Vorbis files? /usr/bin/vorbiscomment is a pain in the rear to be used > | in scripts! > > How is vorbiscomment such a pain? It seems rather convenient to me. > Just echo the data on it's stdin (name=value pairs) or specify the > same name=value pairs with the -t argument. I partially agree with you, but give me nice shellcode to use in a script with xargs (because of find -print0 | xargs -0) that can (a) change e.g. the ARTIST value (b) add a new name=value pair, but not if it already exists. The only way I was able to do these two is: (a) for i in `find . -name something`; do vorbiscomment -l $i | sed -e 's/(ARTIST=).*/\1new_value/' | \ vorbiscomment -w $i done (b) for i in `find . -name something`; do (vorbiscomment -l $i | grep -v NAME; echo NAME=VALUE) | \ vorbiscomment -w $i done Neither is xargs usable, and the second even has to spawn a subshell. With id3, both would be possible in a single xargs-compatible line. -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck "if I can't dance, i don't want to be part of your revolution." - emma goldman
Attachment:
pgp5AtAhUjZ8C.pgp
Description: PGP signature