bug-gnu-utils
[Top][All Lists]
Advanced

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

sed bug report


From: Josh McFarlane
Subject: sed bug report
Date: Wed, 13 Jun 2012 13:04:56 +1000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe I have found a potential bug in sed extended regular
expressions. Using the following command:
$sed -n -r '/^\s*[^\s]+\s*$/p' test.txt

Where test.txt conatins:
a
         b
a b

Produces the following output:
 a
         b
a b

In my opinion this is an unexpected behavior as this regular
expression should only print lines where there is zero or more
whitespace characters, followed by one or more non whitespace
characters, followed by zero or more whitespace characters, followed
by the end of the line.

I hope that this was of help.
Regards,
Josh McFarlane.

$ sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <address@hidden>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJP2ANRAAoJEArUWvHxHhgsKcAQAIv1psyyJtDnC8U4ODDwYrRg
KfKPU+n5vaapcKt+NUaAuWwy7XcxU7hjBJQXs52XLQwNLou6JeBtXuMQKuo6hm33
NtyCbvpMsqz6uMlT+qIB/kJHOeGb/hNHDYVUEYbeN9mUquf2Qd9Jo4IThAyEcdkA
uBF2UrQ+bFEfqquCO3ma3+9fMxcNIz+/KYgEmGlVlfuvi2aMEInGfkSobOu6ywdf
nxLP0b3+u8Rsdc7r+ur0UxeJU2ulykrW4bMOzs8Yxb5QYYrjp1U3xTiSVhS1NNlq
ohWy8unqm45+fbgU5e2tfXAclpMsAHZjo9VgucNzru5bSbNgMQcr1MKtRnVOckcj
FAjdV6tJKvrSYOVEACL55y6bCj2c6FgogOqFlc2PsyASy7il6RvHuInU9PE3hmmd
T7+ICULphXiSpB+dPNHuUCL0KVGPcuCOt3+VkgsQNLU7Mun5DHLK672uBZ0ovSeF
loSsF/8w84tZIIOa6HQCRtCESbEXtatRvb8hWNqA+IAPHJb9YlJVh8V6T5o0ZRdL
2LaPjTrjUkCcsXDmFD+CKEk1kAFKqClmETuKN1OS6yT5zQ29IHDUlts9kXWe3zOn
XN3/D8lggscYsOLmHgfZBWsfzrCrApTFfByYQ1yfo3HPr2H5e5aVCowYJEvaycrt
bYN0T/Vmu7JMu0hAaonT
=SwHO
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]