How can I fix a error when the env.csh be runned?

I'm a CASCADE beginner.
I'm trying to install Open CASCADE in Linux System(unbuntu 10.4)

I'm trying to run env.csh, but I have a error message
% vi env.csh
if (! $?TCLHOME ) then
echo $OCCT3RDPARTY/tcltk ################################################## Error in the NEXT LINE
setenv TCLHOME $OCCT3RDPARTY/tcltk echo $TCLHOME endif
#### the rest is ommited

% source env.csh_test
3rdparty products for building and launching Open CASCADE Technology
and samples/tcltk
setenv: Too many arguments.

Attachments: 
m-aronsson's picture

Make sure that you don't have a setenv command with a path using spaces, if you do you must quote it.

okwanh's picture

Thanks.
I've solved my error as your reply.
Thereafter, I have another error when PATH is defined.

#1. --- Execution of orginal env.csh
% source env.csh
Unknown variable modifier.

#2. --- Excution of a copy that was modified for test.
I searched a error causing pahase, that is $TBBBIN.
But, I don't know the reason and I don't konw how can I resove the problem.
% vi env.csh_test
36 echo $CASROOT $OS_NAME
37 if ( $?PATH ) then
38 echo "aaaaaaaaaaaaaaa"
39 setenv PATH "$TCLHOME/bin:$QTDIR/bin:$FTGLDIR/bin:$GL2PSDIR/bin:$FREEIMAGEDIR/bin:$CASROOT/$OS_NAME/bin:$PATH"
40 echo $PATH
41 echo "bbbbbbbbbbb"
42
43 setenv PATH "$TCLHOME/bin:$QTDIR/bin:$FTGLDIR/bin:$GL2PSDIR/bin:$FREEIMAGEDIR/bin:$TBBBIN:$CASROOT/$OS_NAME/bin:$PATH"
44 echo "eeeeeeeeeeeeee"

% source ./env.csh_test
Open CASCADE location/ros Linux
aaaaaaaaaaaaaaa
3rdparty products for building and launching Open CASCADE Technology and samples/tcltk/bin:3rdparty products for building and launching Open CASCADE Technology and samples/qt/bin:3rdparty products for building and launching Open CASCADE Technology and samples/ftgl/bin:3rdparty products for building and launching Open CASCADE Technology and samples/gl2ps/bin:3rdparty products for building and launching Open CASCADE Technology and samples/freeimage/bin:Open CASCADE location/ros/Linux/bin:3rdparty products for building and launching Open CASCADE Technology and samples/tbb/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
bbbbbbbbbbb
Unknown variable modifier.
% ^C
%

okwanh's picture

I'm sorry. My 2nd question have a mistake where %source ./env.csh_test of #2 is runned.

when I open a new window, $PATH is initialized, that is, ":/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

and 1st runnung of env.csh_test

% echo $APTH
APTH: Undefined variable.
% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
% cd OCC
% cd ros
% source ./env.csh_test
Open CASCADE location/ros Linux
aaaaaaaaaaaaaaa
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games 1
3rdparty products for building and launching Open CASCADE Technology and samples/tcltk/bin:3rdparty products for building and launching Open CASCADE Technology and samples/qt/bin:3rdparty products for building and launching Open CASCADE Technology and samples/ftgl/bin:3rdparty products for building and launching Open CASCADE Technology and samples/gl2ps/bin:3rdparty products for building and launching Open CASCADE Technology and samples/freeimage/bin:Open CASCADE location/ros/Linux/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
bbbbbbbbbbb
Unknown variable modifier.
% ^C
%