
set newpath=

foreach p ( `echo ${PATH} | sed 's#:# #g'` )
  echo ${p} | egrep '/CMT/' >& /dev/null
  set s=${status}
  if ( "${s}" != 0 ) then
    if ( ${newpath} == "" ) then
      set newpath=${p}
    else
      set newpath=${newpath}:${p}
    endif
  endif
end

setenv PATH ${newpath}
unsetenv CMTCONFIG
unsetenv CMTROOT

