Re: sed bug

Jim Meyering <[email protected]> Wed, 18 Mar 2015 12:37:25 -0700
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <CA+8g5KH+oDUn=ZOW99ZX_DNoCLmuRpytMVocChkM2txnXTeUNw@mail.gmail.com>
On Wed, Mar 18, 2015 at 7:42 AM, Peter Scott <[email protected]> wrote:
> Hi,
>
> $ sed --version
> sed (GNU sed) 4.2.2
> Copyright (C) 2012 Free ...
>
> # This works
> #
> $ sed 's/foo/bar/i'
> FOO
> bar
> $
>
> # I think this should work too.
> #
> $ sed '/foo/s//bar/i'
> sed: -e expression #1, char 13: cannot specify modifiers on empty regexp

Thanks for spotting and reporting that. I certainly think it should work.
I suspect it is simply an oversight, and we will fix it for the
upcoming release.