Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 83087c42ed4aed88a51d7da8f1e04c0c > files > 62

bash-3.2-33.el5.1.x86_64.rpm

inpath()
{
	local PROG
	path=$(echo $PATH | sed 's/^:/.:/
				s/::/:.:/g
				s/:$/:./
				s/:/ /g')

	for x in $path
	do
		[ -x $x/$1 ] && { PROG=$x/$1; break; }
	done
	[ -n "$PROG" ]
}