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

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

Re: sed


From: Akim Demaille
Subject: Re: sed
Date: 28 Sep 2000 11:37:41 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

| I found what appears to be a bug in sed version 3.02
| When you replace a regexp beginning with ^, it always thinks
| a replacement has been made even if one hasn't.  
| For example in a script
| 
| s/^{}/()/
| t startpair
| ..
| :startpair
| 
| it will always jump to the label startpair
| whether or not the pattern space starts with {}

I don't observe this:

/tmp % (echo "()" && echo "{}") | sed 's/^{}/()/
t startpair
s/.*/failed/
:startpair
s/^/=> /'
=> failed
=> ()

/tmp % sed --version
GNU sed version 3.02

Copyright (C) 1998 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.



reply via email to

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