Re: [PATCH 1/3] configure: Add test for Perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]