<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Segment on Amit Agarwal Linux Blog</title>
    <link>/tags/segment/</link>
    <description>Recent content in Segment on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 18 Dec 2009 07:43:41 +0000</lastBuildDate>
    
	<atom:link href="/tags/segment/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Display a block of text with delineated by a start pattern and an end  pattern</title>
      <link>/2009/12/18/display-a-block-of-text-with-delineated-by-a-start-pattern-and-an-end-pattern/</link>
      <pubDate>Fri, 18 Dec 2009 07:43:41 +0000</pubDate>
      
      <guid>/2009/12/18/display-a-block-of-text-with-delineated-by-a-start-pattern-and-an-end-pattern/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Taken idea from commandlinefu.com&lt;/p&gt;
&lt;p&gt;The command will display a segment from the file from the start pattern to the end pattern.&lt;/p&gt;
&lt;p&gt;function viewsegment() { tail -n +`fgrep -n -m 1 &amp;ldquo;$1&amp;rdquo; $3 | head -`fgrep -n -m 1 &amp;ldquo;$2&amp;rdquo; $3 }&lt;br&gt;
Display a block of text with delineated by a start pattern and an end pattern&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
