You're absolutely right.
The double '[' got me.


2014-07-31 10:34 GMT+02:00 Marc Kleine-Budde <mkl@pengutronix.de>:
On 07/29/2014 04:39 PM, Kristof Verdonck wrote:
> I'm using an ancient ptxdist, but that doesn't matter because I'm
> isolating the SED-version check.
>
> If I run the regex
> from http://git.pengutronix.de/?p=ptxdist.git;a=blob;f=configure.ac;h=22c8df03a8c225514a3df7ba4c9fb29c515c3e24;hb=HEAD
> sed --version 2>/dev/null | sed -ne "1 s/.*GNU.*\s\([[0-9\+\.]]\+\).*/\1/p"
> then it returns empty, both with sed 4.2.1 and 4.2.2.

Are you using the unmodified regex from the configure.ac in the shell?

Try this instead:

    sed --version 2>/dev/null | \
        sed -ne "1 s/.*GNU.*\s\([0-9\+\.]\+\).*/\1/p"

Note: '[' vs. '[[', as you have to quote '[' in configure.ac, as it's
processed by m4.

Marc

--
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


--
ptxdist mailing list
ptxdist@pengutronix.de