On Tue, Aug 19, 2003 at 05:24:51PM +1200, Chris Bayley wrote:
> In egrep or sed what is the metacharacter to match _across_ a newline
> i.e. something like 'line1chars.\n.line2chars' ?  $ matches the end of
> a line, but I want to match several lines for search and replace

For sed, you'll need to use the 'N' function (search the man page for
'[2addr]N').

For grep, you're stuck.

It's probably easier to do whatever you want to do in Perl.  But if you
insist on using grep or sed, you're stuck with writing something
moderately complicated in sed.

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                [EMAIL PROTECTED]

Reply via email to