[Top][All Lists]

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

Re: don't work '\n' in Gnu SED for windows

From: Ralf Wildenhues
Subject: Re: don't work '\n' in Gnu SED for windows
Date: Thu, 21 Aug 2008 11:06:24 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Paolo,

* Paolo Bonzini wrote on Wed, Aug 20, 2008 at 09:58:39AM CEST:
> address@hidden wrote:
>> I'm trying to change some string in a text file with GNU SED(FOR
>> but it seems that '\n' is not work!!

> This means that newlines do *not* get into the pattern space.  You  
> cannot expect to use \n to match multiple lines of input.  There are  
> some tricks to do this however -- for more info look on  
> http://sed.sf.net/grabbag for tutorials and example scripts.
> (To other people on bug-gnu-utils: I'm considering putting this in the  
> NON-BUGS section of the manual.  Do you have any suggestion on the 
> wording?)

No, but it would be nice if the manual also documented that \n is
portable in the BRE part of the s command (or, more generally, in
any BRE of sed), but _not_ in the substitution part of the s command,
where backslash newline is the only portable way.


reply via email to

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