[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Recommended way to truncate a shell variable value in autoconf
From: |
Dale Visser |
Subject: |
RE: Recommended way to truncate a shell variable value in autoconf |
Date: |
Fri, 21 Feb 2014 18:50:36 -0500 |
> Date: Fri, 21 Feb 2014 15:23:31 -0700
> From: address@hidden
> To: address@hidden; address@hidden
> Subject: Re: Recommended way to truncate a shell variable value in autoconf
>
> ...
> is portable. Until then, the only portable fallback to this particular
> problem is the use of 'expr' pattern matching and/or sed scripts. :(
I've figured a working alternative using successive calls to `expr STRING :
REGEXP`
But then again I notice in the autoconf docs
(https://www.gnu.org/software/autoconf/manual/autoconf.html#Limitations-of-Usual-Tools)
this:
"Don't use length, substr, match and index."
Since "STRING : REGEXP" does the same thing as "match STRING REGEXP", does that
mean I'm out of luck with this approach, too?