[Radiance-general] Bash problems
Dan Fitzpatrick
danf at eb7.co.uk
Wed Jul 22 10:29:11 PDT 2009
Dear Community
I am trying to determine a maximum illum value within a picture file then print the result if it is above a certain value. Here is where I am at the moment:
maxim=$(pextrem -o 9.pic | rcalc -e '$1=($3*0.265+$4*0.670+$5*0.065)*179' | total -u)
echo $maxim
if [ "$maxim" -gt 15000 ] ; then
pextrem -o 9.pic | rcalc -e '$1=($3*0.265+$4*0.670+$5*0.065)*179' total -u > 9.dat
fi
done
The problem: I keep getting the : integer expression expected warning. As far as I can see, $maxim is an integer as shown from the echo expression. Therefore I don't understand what I'm doing wrong here. Any pointers will be greatly appreciated.
Dan
More information about the Radiance-general
mailing list