|
From: | Paolo Bonzini |
Subject: | Re: sed: dot does not match newline in multi-line mode (the M modifier) - bug or feature? |
Date: | Wed, 23 Nov 2011 11:36:31 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
On 11/23/2011 11:15 AM, Dmitry Bolshakov wrote:
Hi $ sed --version | head -n1 GNU sed version 4.2.1 test command: $ echo $'line1\nline2\nline3' | sed -n '1h;1!H;$bend;b; :end g;s/.*/dot matches newline/;p; g;s/.*/dot does not match newline/M;p' dot matches newline dot does not match newline line2 line3 I could not find anything about such behaviour in manual is this bug or feature?
It's a feature, but an undocumented one indeed. Thanks for the report. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |