On Wednesday 08 Jun 2011 01:40:04 Gary Hodder wrote:
can somebody help me with a script using mp3info that will only print out number of files in a directory and number of files with a bit rate of less than 192k.
The command below does not use mp3info as I don't have it installed, but it does the job for me: file "dirname"/* | awk 'BEGIN {total=bad=0} /contains: MPEG ADTS, layer III/ { x=match($0, "^([^:]+):.*, ([0-9]+) kbps,", a); total++; if(x>0 && a[2]<192) {bad++}} END {print total, bad}' Replace dirname with the name of the directory you want to scan (keep the quotes around the name so that special characters don't cause a problem). One more thing: I assumed by "number of files in a directory" you meant "number of mp3 files in a directory". Tom -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org