Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

bash xargs script

Name: Anonymous 2008-06-01 12:02

i'm working in a bash script that writes id3 tags to some files i have that don't have id3 tags, just the filename with the song's name. these specific files have a format, which is
(number)(number) - (song name)(2).mp3
so i made this:
for i in * ; do e=`echo $i | sed -e 's/\ /\\\\ /g;s/(/\\\\(/g;s/)/\\\\)/g'` ; echo $i | grep -i [0-9][0-9] | sed s/^[0-9][0-9]\ -\ //g\;s/\(.*//g | sed s/\ $//g | xargs -I {} echo id3 -a Mecano -t \"{}\" $e ; done

it outputs this:

id3 -a Mecano -t "Hoy No Me Puedo Levantar" 01\ -\ Hoy\ No\ Me\ Puedo\ Levantar\ \(2\).mp3
id3 -a Mecano -t "No Me Enseñen La Lección" 02\ -\ No\ Me\ Enseñen\ La\ Lección\ \(2\).mp3

which is exactly what i want to execute. now, when i remove the echo and actually execute it, it gives me

id3: no files matching 01\
id3: no files matching -\
id3: no files matching Hoy\
id3: no files matching No\
id3: no files matching Me\
id3: no files matching Puedo\
id3: no files matching Levantar\
id3: no files matching \(2\).mp3
id3: no files matching 02\
id3: no files matching -\
id3: no files matching No\
id3: no files matching Me\
id3: no files matching Enseñen\
id3: no files matching La\
id3: no files matching Lección\
id3: no files matching \(2\).mp3

any help?

Name: Anonymous 2008-06-01 17:03

>>6
lrn2sh, perl weenie
for i in *.mp3; do echo id3 -a Mecano -t "`echo "$i" | sed 's/^[0-9][0-9] - \(.*\)(2).mp3/\1/'`" "$i"; done

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List