t/csh path setting 

> In t/csh I could do this as:
>
> if("$path" !~ /bin) seth path = ($path /bin)
>

Your path may appear either as:

mypath:rest_of_path
star_of_path:mypath:rest_of_path
star_of_path:mypath
p=/my/path
case $PATH in
   $p:*|*:$p:*|*:$p) ;;
   *) PATH=$PATH:$p;;
esac

Dan Mercer

t/csh path setting 

Which can be simplified to:

case :$PATH: in
  *:$p:*) ;;
  *) PATH=$PATH:$p ;;
esac

Ken Pizzini