GNU bug report logs -
#32592
s with i modifier seems to work incorrectly
Previous Next
Reported by: Saito Takaaki <tails.saito <at> gmail.com>
Date: Thu, 30 Aug 2018 14:44:01 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Greetings,
I guess the "s" command, when "i" flag is supplied,
does not work correctly in some cases.
Assuming the following Bash command as an example:
echo abcdefghijkl | sed 'h;G;s/\(a.*\).*\1/(\1)/i'
the expected output is:
(abcdefghijkl)
(The command would output it as expected if the final "i"
flag were not supplied.)
However, the actual output is [1][2]:
(abcdefg)hijkl
or [3]:
(abcdefgh)ijkl
[1] sed (GNU sed) 4.4 Packaged by Cygwin (4.4-1)
on Cygwin/Windows 10 (32bit)
[2] GNU sed version 4.2.1 on Debian wheezy/sid (32bit)
[3] sed (GNU sed) 4.4.2 on CentOS 7 (64bit)
I'm sorry I haven't tested that with the latest sed 4.5.
Thank you very much for your attention.
--
Takaaki Saito
This bug report was last modified 6 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.