<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sed command explanation needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869661#M773365</link>
    <description>&lt;!--!*#--&gt;Hi, Subbu,&lt;BR /&gt;&lt;BR /&gt;-e edit according to "operation" like 's/string1/strings2/'&lt;BR /&gt;&lt;BR /&gt;:a label the edit operation as "a" and it will be used in branch option "b" so 'ba' means branch to "a".&lt;BR /&gt;&lt;BR /&gt;The problem here is that whithout knowing what are $q, $cnt and $D it is impossible to tell exactly what this statement trying to do.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Yang</description>
    <pubDate>Tue, 26 Sep 2006 08:36:46 GMT</pubDate>
    <dc:creator>Yang Qin_1</dc:creator>
    <dc:date>2006-09-26T08:36:46Z</dc:date>
    <item>
      <title>sed command explanation needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869660#M773364</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Could you please explain me the below statement -- phrase wise.&lt;BR /&gt;&lt;BR /&gt;sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt &amp;gt; xyz.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;as early as possible.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Subbu</description>
      <pubDate>Tue, 26 Sep 2006 07:31:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869660#M773364</guid>
      <dc:creator>subbukns</dc:creator>
      <dc:date>2006-09-26T07:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: sed command explanation needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869661#M773365</link>
      <description>&lt;!--!*#--&gt;Hi, Subbu,&lt;BR /&gt;&lt;BR /&gt;-e edit according to "operation" like 's/string1/strings2/'&lt;BR /&gt;&lt;BR /&gt;:a label the edit operation as "a" and it will be used in branch option "b" so 'ba' means branch to "a".&lt;BR /&gt;&lt;BR /&gt;The problem here is that whithout knowing what are $q, $cnt and $D it is impossible to tell exactly what this statement trying to do.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Yang</description>
      <pubDate>Tue, 26 Sep 2006 08:36:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869661#M773365</guid>
      <dc:creator>Yang Qin_1</dc:creator>
      <dc:date>2006-09-26T08:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: sed command explanation needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869662#M773366</link>
      <description>Hi Subbu,&lt;BR /&gt;&lt;BR /&gt;This script is from sed one-liners:&lt;BR /&gt;&lt;A href="http://www.student.northpark.edu/pemente/sed/sed1line.txt" target="_blank"&gt;http://www.student.northpark.edu/pemente/sed/sed1line.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It packs a lot of functionality into a very small program.  Here's my best shot at parsing it:&lt;BR /&gt;&lt;BR /&gt;sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt &amp;gt; xyz.txt&lt;BR /&gt;&lt;BR /&gt;-e &amp;lt;script&amp;gt;    -- read from &amp;lt;script&amp;gt;&lt;BR /&gt;:a             -- define label a&lt;BR /&gt;$q             -- quit at EOF&lt;BR /&gt;N              -- read in next line&lt;BR /&gt;'$cnt'         -- $cnt-1 lines will be displayed&lt;BR /&gt;$D             -- delete at EOF&lt;BR /&gt;ba             -- branch to label a&lt;BR /&gt;abc.txt        -- take abc.txt as input&lt;BR /&gt;&amp;gt; xyz.txt      -- output to xyz.txt&lt;BR /&gt;&lt;BR /&gt;For an easier-to-understand sed script that emulates 'tail', see "Sed - An Introduction":&lt;BR /&gt;&lt;A href="http://www.grymoire.com/Unix/Sed.html#toc-uh-30" target="_blank"&gt;http://www.grymoire.com/Unix/Sed.html#toc-uh-30&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Tue, 26 Sep 2006 08:37:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869662#M773366</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-09-26T08:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: sed command explanation needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869663#M773367</link>
      <description>Hi Yang &amp;amp; PCS,&lt;BR /&gt;&lt;BR /&gt;Thank you very much guys for your quick response.&lt;BR /&gt;&lt;BR /&gt;cheers,&lt;BR /&gt;Subbu.</description>
      <pubDate>Tue, 26 Sep 2006 10:21:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-explanation-needed/m-p/3869663#M773367</guid>
      <dc:creator>subbukns</dc:creator>
      <dc:date>2006-09-26T10:21:45Z</dc:date>
    </item>
  </channel>
</rss>

