Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2016 10:20:12 +0200
From:      =?UTF-8?B?Sm9zw6kgR2FyY8OtYSBKdWFuaW5v?= <jjuanino@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   sed command does not behave equal from 10.3 to 11.0
Message-ID:  <CAAVO5%2BLjAsN%2Bj%2B9sa%2B6pGVjDBqqe=MR9spKrsEuHWApfm5kRNA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi FreeBSD stable,

After upgrade to 11.0-BETA2, a lot of sed scripts are no longer valid:

FreeBSD 10.3
---------------------
$ echo "abc_ABC.def" | sed -e 's/[^A-Z0-9]//g'
ABC


FreeBSD 11.0
--------------------
$ echo "abc_ABC.def" | sed -e 's/[^A-Z0-9]//g'
bcABCdef


Indeed, in 11.0 you need to re rewrite the sentence as follows:

$ echo "abc_ABC.def" | sed -e 's/[^[:upper:][:digit:]]//g'
ABC

In linux, sed behaves exactly as 10.3.

Is this behaviour expected or is a bug?

Best regards



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAVO5%2BLjAsN%2Bj%2B9sa%2B6pGVjDBqqe=MR9spKrsEuHWApfm5kRNA>