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

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

Re: sed --posix


From: Karl Berry
Subject: Re: sed --posix
Date: Wed, 27 May 2009 18:06:16 -0500

    \| is treated like |, matching a literal | (traditional behavior)
    \| is treated as an alternation operator (GNU behavior)
    \| is an error (my preference)

    My claim that sed has a bug is that you chose the first behavior without
    - --posix

Oh?  I am seeing that \| is treated as the alternation operator without
--posix:

$ echo bar | sed 's/foo\|bar/baz/'
baz
$ sed --version
GNU sed version 4.2

And I am very glad about that!




reply via email to

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