|
bash scripting
Well,
I thought I had a problem, but I worked it out. It was a very stupid mistake of leaving out an argument. So I deleted my question and am posting my solution.
I wanted to edit the id3 tag info for my tracks that follow a naming patter like:
tracknum-trackname.mp3
This is what I came up with using id3edit as the tag editor:
#!/bin/bash
# allofmp3id3.sh
# adds track and genre to mp3s
genre=$1
criteria='.mp3'
for i in $( ls *$criteria* );
do
file=$i
track=`expr substr $file 1 2`
echo "Track Number $track"
id3edit -t $track -g $genre $file
done
I use it by:
# sh id3.sh [GENRE NUMBER - e.g. Country = 2]
sam
Last edited by sutley; 12-17-2004 at 12:45 PM.
|