Sophie

Sophie

distrib > Mageia > 3 > x86_64 > by-pkgid > 03c48c16b5559c045c4b28738358ecbb > files > 53

bash-doc-4.2-53.1.mga3.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" ]
}