> 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