Gerrit Pape wrote: > This should work with shell/builtins only, no sed/cut: > > path=${PATH}: > while test -n "$path"; do > p=${path%%:*}/$1 > test ! -x "$p" || { echo "$p"; return 0; } > path=${path#*:} $ exec /bin/sh $ uname -a SunOS hostname 5.9 Generic_118558-25 sun4u sparc SUNW,Ultra-5_10 Solaris $ echo ${PATH%%:*} bad substitution $ echo ${PATH#*:} bad substitution Regards, Dennis - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html