Man,
Your question has too many answers. Each one who posts here will give you one solution. If you want to change the order of the path for a specific script, may be the best is to put the preferred paths in front of the path list which you have. By the command you used as example, I suppose you are using C shell. I don't know its syntax to give you an example. But in bourne shell, from which bash is descendant, suppose I have this path:
PATH=/usr/bin:/bin:/usr/sbin:/sbin:.... and we want some script to look first in /sbin, but maintain all the search path, we would do:
PATH=/sbin:$PATH
We could compose an editor for the path, but we would spend too much effort before the task to be done.
|