bug-sed
[Top][All Lists]
Advanced

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

bug#32592: s with i modifier seems to work incorrectly


From: Saito Takaaki
Subject: bug#32592: s with i modifier seems to work incorrectly
Date: Thu, 30 Aug 2018 17:31:29 +0900

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





reply via email to

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