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
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