Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 7ec468a1a88b2e7695fe8ff28c5f32de > files > 53

bash-doc-4.2-49.1.mga4.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" ]
}