Mailinglist Archive: opensuse (671 mails)
| < Previous | Next > |
[opensuse] Re: mp3info help
- From: Charles Philip Chan <cpchan@xxxxxxxx>
- Date: Wed, 08 Jun 2011 04:36:19 -0400
- Message-id: <8739jk1zzw.fsf@karnak.MagnumOpus.khem>
Gary Hodder <vk2kcf@xxxxxxxxxx> writes:
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)
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)
| < Previous | Next > |