Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 644298068be8c6fb35a2223484b8220a > files > 44

bash-doc-4.4-23.1.mga7.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" ]
}