Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

drmjdoyle

macrumors newbie
Original poster
Mar 5, 2014
1
0
I am trying to design a drag and drop automator app to show the bit rate of audio files dropped on the applet. I can pass the selected files but have trouble getting the following shell script to display a bit rate. Also not sure how to get automator to display the results in a window or pop-up of some kind.

Here is my shell script:

#! /bin/bash
cat
for FILE1 in "$@"
do
FN="${FILE1##*\/}"
#echo $FILE1 | sed 's/^.*\//'
BR=$(afinfo $FILE1 | grep "bit rate")
echo -e $FN "\t" $BR
done

The file names display in the results window in automator, but not the bit rates.

Help please
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.