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

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

sed bug


From: Duane Dombrowski
Subject: sed bug
Date: Thu, 19 May 2011 11:04:49 -0500

Actually this appears to be a bug in regexp (e.g., problems are observed in 
both grep and sed).
Character range specifications seem to be broken.
They  seem to exclude certain characters:

echo "ab-" | sed "s/[ -z]/x/g"
produces
xx-
where it should produce
xxx

And they don't seem to recognize some valid end of range characters:
echo "abc" | sed "s/[ -~]/x/g"
produces
abc
where it should produce
xxx

The equivalent, but longer, regexp produces the expected output
echo "abc" | sed "s/[ -z{|}~]/x/g"
xxx



******* CONFIDENTIALITY NOTICE *******
This e-mail message and all attachments transmitted with it may
contain legally privileged and confidential information intended
solely for the use of the addressee. If the reader of this message
is not the intended recipient, you are hereby notified that any
reading, dissemination, distribution, copying, or other use of this
message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender
immediately and delete this message from your system. Thank you.


reply via email to

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