[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030131: DSSERVE/IMGLIST error message (cont.)

>From: "Kwan-yin Kong" <address@hidden>
>Organization: CCNY
>Keywords: 200301272351.h0RNpd617689 McIDAS DSSERVE


>It makes more sense to me now that you've explained it to 


>If I were to put the set path=(....) line anywhere in the 
>.tcshrc and be able to start McIDAS, then I would have to 
>move the if ( ! ${?path} ) block out of the if ( ! 
>${?MCPATH} ) block.  Does that work also?  i.e.,

>># umask
>>umask 002
>>set prompt="<-$LOGNAME-> "
>>alias dir "ls -alg;echo 'Current Directory:';pwd"
>>alias mv "mv -i"
>>setenv EDITOR vi
>>set path= ( /usr/bin /usr/dt/bin /usr/openwin/bin 
>>/usr/local/bin /usr/ccs/bin /opt/sfw/bin .)
>>setenv MCHOME $HOME
>># NOTE: conditional definition is only needed for C-shell
>>if ( ! ${?MCPATH} ) then
>>    setenv MCDATA $MCHOME/workdata
>>    setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help
>>    setenv MCGUI  $MCHOME/bin
>>    setenv MCTABLE_READ 
>>    setenv XCD_disp_file $MCDATA/DECOSTAT.DAT
>>if ( ! ${?path} ) then
>>  set path=$MCGUI
>> else
>>  set path=(${MCGUI} $path)
>># Limit ADDE transfers to compressed ones

There are two reasons I didn't do this:

1) since you define path at the top of the .tcshrc file, the first branch

if ( ! ${?path} ) then
  set path=$MCGUI
  set path=(${MCGUI} $path)

  will never be true.  The 'if ( ! ${?path} ) then' statement says
  "if path is not defined then".  If you define path at the top, path
  will always be defined.

2) I was trying to not modify path each time .tcshrc was reread by
   mcenv.  I figured that I could avoid the redefines by not even
   checking path when MCPATH is defined.

The crazy thing about all of this is that you do not have to do this
if you are using a different shell like bash, sh.  You only have to
have this strange, difficult construct when you use C/Tcsh shell.


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.