8 Jun
2011
8 Jun
'11
08:36
Gary Hodder <vk2kcf@vk2kcf.com> writes:
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.
Off the top of my head, you can do something like this: #!/bin/sh count=0 count1=0 for i in *.mp3 do count=`expr $count + 1` rate=`mp3info -p "%r" "$i"` if [ $rate -lt 192 ]; then count1=`expr $count1 + 1`; fi done echo "Total number of mp3 files: $count" echo "Total number of mp3 files < 192 kbps: $count1" Charles -- "If a machine couldn't run a free operating system, we got rid of it." -- Richard Stallman (Open Sources, 1999 O'Reilly and Associates)