using rtcontrib in a script (Linux)

Hi all,
I am having a problem where consolidating rtcontrib into a script file results
in the error Illegal Variable Name. Is there a reason for this, or is it an
issue of syntax in the script? I am currently working on a modification of Axel
Jacob's suggestions that works great when entered into the terminal line by
line...!

The contents of my script, as they currently stand, is:

#!/bin/csh

gendaylit 9 7 12 -a 51 -o 0 -m 0 -P 6.3 0.12 \

genskyvec -m 1 > tmp/skydist.dat

set vw="-x 600 -y 600 -vf views/window_basic.vf"

oconv materials/room.mat materials/window_basic.mat room.rad \
window_basic.rad skies/sky_white.rad > room_clear.oct

vwrays -ff $vw | rtcontrib @rtc.opt -ffc $(vwrays -d $vw) -e MF:2 \
-f reinhart.cal -b rbin -o images/patches/p%03d.hdr \
-m sky_glow -w room_clear.oct

pcomb -h $(bash apply_tregsamp.bash) > images/testscript.hdr

Can anyone help with this problem?
Thanks!
shreya

Hi Shreya,

I don't think you can put a variable in parentheses in a C-shell script:

  $(vwrays -d $vw)

The correct syntax is to use backwards single-quotes, a la:

  `vwrays -d $vw`

-Greg

···

From: Shreya <[email protected]>
Date: October 21, 2010 2:54:10 PM PDT

Hi all,
I am having a problem where consolidating rtcontrib into a script file results
in the error Illegal Variable Name. Is there a reason for this, or is it an
issue of syntax in the script? I am currently working on a modification of Axel
Jacob's suggestions that works great when entered into the terminal line by
line...!

The contents of my script, as they currently stand, is:

#!/bin/csh

gendaylit 9 7 12 -a 51 -o 0 -m 0 -P 6.3 0.12 \
>genskyvec -m 1 > tmp/skydist.dat

set vw="-x 600 -y 600 -vf views/window_basic.vf"

oconv materials/room.mat materials/window_basic.mat room.rad \
window_basic.rad skies/sky_white.rad > room_clear.oct

vwrays -ff $vw | rtcontrib @rtc.opt -ffc $(vwrays -d $vw) -e MF:2 \
-f reinhart.cal -b rbin -o images/patches/p%03d.hdr \
-m sky_glow -w room_clear.oct

pcomb -h $(bash apply_tregsamp.bash) > images/testscript.hdr

Can anyone help with this problem?
Thanks!
shreya

Thank you so much, that solved the problem immediately!