[Radiance-general] Bash problems

Jack de Valpine jedev at visarc.com
Wed Jul 22 11:16:50 PDT 2009


Hi Dan,

It looks like you need a "|" in your second call to pextrem (before 
total). However since you have already calculated the value for maxim, 
why not just echo $maxim to 9.dat? Such as:

    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
    echo $maxim > 9.dat
    fi
    done
      

-Jack

Dan Fitzpatrick wrote:
> 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
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>   


-- 
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://radiance-online.org/pipermail/radiance-general/attachments/20090722/f79f8271/attachment.htm


More information about the Radiance-general mailing list