[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

Kwan-yin,

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

OK.

>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 .)
>>
>># MCHOME and McINST_ROOT
>>setenv MCHOME $HOME
>>setenv McINST_ROOT $MCHOME
>>
>># NOTE: conditional definition is only needed for C-shell
>>users
>>if ( ! ${?MCPATH} ) then
>>    setenv MCDATA $MCHOME/workdata
>>    setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help
>>    setenv MCGUI  $MCHOME/bin
>>    setenv MCTABLE_READ 
>>"${MCDATA}/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
>>    setenv MCTABLE_WRITE "$MCHOME/data/ADDESITE.TXT"
>>    setenv XCD_disp_file $MCDATA/DECOSTAT.DAT
>>endif
>>if ( ! ${?path} ) then
>>  set path=$MCGUI
>> else
>>  set path=(${MCGUI} $path)
>>endif
>>
>># Limit ADDE transfers to compressed ones
>>setenv MCCOMPRESS TRUE

There are two reasons I didn't do this:

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

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

  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.

Tom