
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.thelinuxwiki.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.thelinuxwiki.com/index.php?action=history&amp;feed=atom&amp;title=sed_match_pattern_spanning_multiple_lines</id>
		<title>sed match pattern spanning multiple lines - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.thelinuxwiki.com/index.php?action=history&amp;feed=atom&amp;title=sed_match_pattern_spanning_multiple_lines"/>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=sed_match_pattern_spanning_multiple_lines&amp;action=history"/>
		<updated>2026-05-01T18:52:23Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.5</generator>

	<entry>
		<id>http://www.thelinuxwiki.com/index.php?title=sed_match_pattern_spanning_multiple_lines&amp;diff=1111&amp;oldid=prev</id>
		<title>Nighthawk: Created page with &quot;file contents   abc  def  ghi  match across 2 lines  # cat .abc.txt | sed -n '/abc/N;/def/p'  abc  def   match across 3 lines  # cat .abc.txt | sed -n '/abc/N;/def/N;/ghi/p'  ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=sed_match_pattern_spanning_multiple_lines&amp;diff=1111&amp;oldid=prev"/>
				<updated>2017-05-17T02:06:25Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;file contents   abc  def  ghi  match across 2 lines  # cat .abc.txt | sed -n &amp;#039;/abc/N;/def/p&amp;#039;  abc  def   match across 3 lines  # cat .abc.txt | sed -n &amp;#039;/abc/N;/def/N;/ghi/p&amp;#039;  ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;file contents&lt;br /&gt;
&lt;br /&gt;
 abc&lt;br /&gt;
 def&lt;br /&gt;
 ghi&lt;br /&gt;
&lt;br /&gt;
match across 2 lines&lt;br /&gt;
 # cat .abc.txt | sed -n '/abc/N;/def/p'&lt;br /&gt;
 abc&lt;br /&gt;
 def&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
match across 3 lines&lt;br /&gt;
 # cat .abc.txt | sed -n '/abc/N;/def/N;/ghi/p'&lt;br /&gt;
 abc&lt;br /&gt;
 def&lt;br /&gt;
 ghi&lt;br /&gt;
&lt;br /&gt;
the N; tells sed to read the next line past \n and continue the match&lt;br /&gt;
&lt;br /&gt;
[[category:sed]]&lt;/div&gt;</summary>
		<author><name>Nighthawk</name></author>	</entry>

	</feed>