[Radiance-general] Bash problems
Greg Ward
gward at lmi.net
Wed Jul 22 11:37:12 PDT 2009
Hi Dan,
I haven't really been following this thread, but did you try the
"floor()" function around your rcalc expression to guarantee you get
an integer result?
-Greg
> From: Dan Fitzpatrick <danf at eb7.co.uk>
> Date: July 22, 2009 10:29:11 AM PDT
>
> 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