<?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: A few sed questions in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247502#M687584</link>
    <description>&lt;!--!*#--&gt;Note JRF's solution uses scripts whose interpreter is the command sed.  awk also works like this.&lt;BR /&gt;(One reason for doing it, is to be able to have single quotes inside.)&lt;BR /&gt;&lt;BR /&gt;But you can do the whole thing inside a shell script too:&lt;BR /&gt;$ sed -e '&lt;BR /&gt;/^current/i\&lt;BR /&gt;before\&lt;BR /&gt;' $file&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I want to parse the following input file.  I want to search for "install:", then add a new line right before "endif"&lt;BR /&gt;&lt;BR /&gt;I would suggest you not use sed for something this complicated.  awk is much easier to understand.&lt;BR /&gt;&lt;BR /&gt;awk '&lt;BR /&gt;/^install:/ { flag = 1 }&lt;BR /&gt;/^endif/ &amp;amp;&amp;amp; flag {&lt;BR /&gt;   print "some new stuff"&lt;BR /&gt;   flag = 0&lt;BR /&gt;}&lt;BR /&gt;{ print }' $file</description>
    <pubDate>Thu, 07 Aug 2008 03:13:42 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-08-07T03:13:42Z</dc:date>
    <item>
      <title>A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247493#M687575</link>
      <description>how do you insert a string and a **blank line** by using sed.&lt;BR /&gt;&lt;BR /&gt;for example&lt;BR /&gt;&lt;BR /&gt;input&lt;BR /&gt;*******************&lt;BR /&gt;current&lt;BR /&gt;**********************&lt;BR /&gt;&lt;BR /&gt;output&lt;BR /&gt;*****************&lt;BR /&gt;before&lt;BR /&gt;&lt;BR /&gt;current&lt;BR /&gt;****************** &lt;BR /&gt;I have the following&lt;BR /&gt;sed "/^current/i before " $file&lt;BR /&gt;&lt;BR /&gt;but it didnt insert a blank line right after the string "before" thank you</description>
      <pubDate>Wed, 06 Aug 2008 20:00:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247493#M687575</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-06T20:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247494#M687576</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Perl is so much easier:&lt;BR /&gt;&lt;BR /&gt;# perl -ple 'print "before\n" if /^current/' file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 06 Aug 2008 20:37:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247494#M687576</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-06T20:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247495#M687577</link>
      <description>Hi (again) Gemini:&lt;BR /&gt;&lt;BR /&gt;# cat mysed&lt;BR /&gt;#!/usr/bin/sed -f&lt;BR /&gt;/^current/{&lt;BR /&gt;i\&lt;BR /&gt;newline with blank line&lt;BR /&gt;i\&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...run as :&lt;BR /&gt;&lt;BR /&gt;# ./mysed file&lt;BR /&gt;&lt;BR /&gt;Note that I used two (2) (i)insert operators.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 06 Aug 2008 20:56:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247495#M687577</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-06T20:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247496#M687578</link>
      <description>Thanks for your clear explaination. I now learned how to use "i\" I see, it is one line at at time. &lt;BR /&gt;&lt;BR /&gt;May I ask you another question? you can use sed, or any shell commands. I have been trying differerent combinations, but I can not get it right...&lt;BR /&gt;&lt;BR /&gt;I want to parse the following input file. basically, I want to search for "install:", then add a new line right before "endif"&lt;BR /&gt;&lt;BR /&gt;I tried the following, but "N" only read the next line, what if I am not sure how many lines, but I want to add a line right before "endif" in the "install:" block.&lt;BR /&gt;&lt;BR /&gt;thanks for spending your time to educate me!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sed -e '/^install:/{&lt;BR /&gt;N&lt;BR /&gt;s,endif,new string,&lt;BR /&gt;#}' $file&lt;BR /&gt;&lt;BR /&gt;input&lt;BR /&gt;******************************&lt;BR /&gt;install: ap_dir &lt;BR /&gt; some lines..&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;preinstall: pub_dir&lt;BR /&gt;  some lines..&lt;BR /&gt;endif&lt;BR /&gt;*******************</description>
      <pubDate>Wed, 06 Aug 2008 22:12:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247496#M687578</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-06T22:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247497#M687579</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;# cat mysed&lt;BR /&gt;#!/usr/bin/sed -f&lt;BR /&gt;/^install/,/^endif/ {&lt;BR /&gt;/^endif/ {&lt;BR /&gt;i\&lt;BR /&gt;newline ADDED&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...using your input:&lt;BR /&gt;&lt;BR /&gt;# cat somestuff&lt;BR /&gt;install: ap_dir&lt;BR /&gt;some lines..&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;preinstall: pub_dir&lt;BR /&gt;some lines..&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;...run as:&lt;BR /&gt;&lt;BR /&gt;# ./mysed somestuff&lt;BR /&gt;install: ap_dir&lt;BR /&gt;some lines..&lt;BR /&gt;newline ADDED&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;preinstall: pub_dir&lt;BR /&gt;some lines..&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 06 Aug 2008 22:55:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247497#M687579</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-06T22:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247498#M687580</link>
      <description>I can not believe it! it works soo beautifully!! &lt;BR /&gt;&lt;BR /&gt;thank you so much!!!&lt;BR /&gt;&lt;BR /&gt;btw, do you have the sed/awk book? where can I learn this trick!!&lt;BR /&gt;&lt;BR /&gt;thanks a million again!!!!!!!!&lt;BR /&gt;&lt;BR /&gt;thank you!!!</description>
      <pubDate>Wed, 06 Aug 2008 23:10:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247498#M687580</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-06T23:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247499#M687581</link>
      <description>Hi (again) Gemini:&lt;BR /&gt;&lt;BR /&gt;I'm happy that I could help.&lt;BR /&gt;&lt;BR /&gt;You might try:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/sed/manual/" target="_blank"&gt;http://www.gnu.org/software/sed/manual/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...and O'Reilly's :&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://oreilly.com/catalog/9781565922259/" target="_blank"&gt;http://oreilly.com/catalog/9781565922259/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...and in various places and various forms:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://student.northpark.edu/pemente/sed/sed1line.txt" target="_blank"&gt;http://student.northpark.edu/pemente/sed/sed1line.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 06 Aug 2008 23:27:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247499#M687581</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-06T23:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247500#M687582</link>
      <description>Hi Gemini:&lt;BR /&gt;&lt;BR /&gt;...and a few credits for the last solution I posted would be appreciated too :-))&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 06 Aug 2008 23:29:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247500#M687582</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-06T23:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247501#M687583</link>
      <description>thanks a million again!&lt;BR /&gt;&lt;BR /&gt;you really made my day!!!&lt;BR /&gt;&lt;BR /&gt;I will check the reference sites!&lt;BR /&gt;&lt;BR /&gt;but, I have searched the website, I think that your example is the best, I have not seen on like that!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Aug 2008 23:30:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247501#M687583</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-06T23:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247502#M687584</link>
      <description>&lt;!--!*#--&gt;Note JRF's solution uses scripts whose interpreter is the command sed.  awk also works like this.&lt;BR /&gt;(One reason for doing it, is to be able to have single quotes inside.)&lt;BR /&gt;&lt;BR /&gt;But you can do the whole thing inside a shell script too:&lt;BR /&gt;$ sed -e '&lt;BR /&gt;/^current/i\&lt;BR /&gt;before\&lt;BR /&gt;' $file&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I want to parse the following input file.  I want to search for "install:", then add a new line right before "endif"&lt;BR /&gt;&lt;BR /&gt;I would suggest you not use sed for something this complicated.  awk is much easier to understand.&lt;BR /&gt;&lt;BR /&gt;awk '&lt;BR /&gt;/^install:/ { flag = 1 }&lt;BR /&gt;/^endif/ &amp;amp;&amp;amp; flag {&lt;BR /&gt;   print "some new stuff"&lt;BR /&gt;   flag = 0&lt;BR /&gt;}&lt;BR /&gt;{ print }' $file</description>
      <pubDate>Thu, 07 Aug 2008 03:13:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247502#M687584</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-07T03:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247503#M687585</link>
      <description>Hi (again) Gemini:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Dennis: I would suggest you not use sed for something this complicated.  awk is much easier to understand.&lt;BR /&gt;&lt;BR /&gt;While 'sed' was not my prefereence either, I would use Perl for the second solution:&lt;BR /&gt;&lt;BR /&gt;# perl -ple 'if (/^install/../^endif/) {print "newline ADDED" if /^endif/}' file&lt;BR /&gt;&lt;BR /&gt;...short, sweet and can be inlined in a shell script.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 07 Aug 2008 10:00:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247503#M687585</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-07T10:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247504#M687586</link>
      <description>One more sed question&lt;BR /&gt;&lt;BR /&gt;input&lt;BR /&gt;*************************&lt;BR /&gt;instal: a b c&lt;BR /&gt;ifeq&lt;BR /&gt;whatever &lt;BR /&gt;endif&lt;BR /&gt;********************&lt;BR /&gt;&lt;BR /&gt;I want to do string substition on "install:"&lt;BR /&gt;but only if there is a "ifeq" right underneath it... how do I do that?&lt;BR /&gt;&lt;BR /&gt;thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 19:37:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247504#M687586</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-13T19:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247505#M687587</link>
      <description>Hi (gemini:&lt;BR /&gt;&lt;BR /&gt;Regarding your newest question, I think you need to look to Perl or 'awk', so:&lt;BR /&gt;&lt;BR /&gt;# perl -nle 'if (/^ifeq/) {$hold=~s/install/NEWINSTALL/};print $hold if defined $hold;$hold=$_' file&lt;BR /&gt;&lt;BR /&gt;...using this input:&lt;BR /&gt;&lt;BR /&gt;# cat input&lt;BR /&gt;install: a b c&lt;BR /&gt;ifeq&lt;BR /&gt;whatever&lt;BR /&gt;endif&lt;BR /&gt;install: a b c&lt;BR /&gt;ofeq&lt;BR /&gt;whatever&lt;BR /&gt;endif&lt;BR /&gt;install: a b c&lt;BR /&gt;ifeq&lt;BR /&gt;whatever&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;...the Perl script yields:&lt;BR /&gt;&lt;BR /&gt;NEWINSTALL: a b c&lt;BR /&gt;ifeq&lt;BR /&gt;whatever&lt;BR /&gt;endif&lt;BR /&gt;install: a b c&lt;BR /&gt;ofeq&lt;BR /&gt;whatever&lt;BR /&gt;endif&lt;BR /&gt;NEWINSTALL: a b c&lt;BR /&gt;ifeq&lt;BR /&gt;whatever&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 13 Aug 2008 19:51:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247505#M687587</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-13T19:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247506#M687588</link>
      <description>thanks for your speedy reply. &lt;BR /&gt;&lt;BR /&gt;So, it can not be done in sed, but it can be done in perl right?&lt;BR /&gt;&lt;BR /&gt;no problem, I can use perl in the shell script, i just want to be sure!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 20:01:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247506#M687588</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-13T20:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247507#M687589</link>
      <description>hmm...I submit 10 point, how come it become 0 point.&lt;BR /&gt;&lt;BR /&gt;when you reply, I will submit the right point again.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 20:02:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247507#M687589</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-13T20:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247508#M687590</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Thanks!  Glad to help!!!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 13 Aug 2008 20:06:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247508#M687590</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-13T20:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247509#M687591</link>
      <description>btw, if you dont mind, can you tell me how you would do it in awk?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 20:07:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247509#M687591</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2008-08-13T20:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247510#M687592</link>
      <description>Hi Gemini:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; So, it can not be done in sed, but it can be done in perl right?&lt;BR /&gt;&lt;BR /&gt;Well, in fairness, I wouldn't say that it can't be done with 'sed' --- a 'sed' guru probably could, but I'm not that.  A good 'sed' guide, including some very advanced handling is here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/sed/manual/sed.html" target="_blank"&gt;http://www.gnu.org/software/sed/manual/sed.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 13 Aug 2008 20:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247510#M687592</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-13T20:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247511#M687593</link>
      <description>Hi Gemini:&lt;BR /&gt;&lt;BR /&gt;OK, 'awk' looks like this:&lt;BR /&gt;&lt;BR /&gt;# awk '{if (/^ifeq/) {sub("install","NEWINSTALL",hold)};if (NR&amp;gt;1) {print hold};hold=$0}' file&lt;BR /&gt;&lt;BR /&gt;...with the same example I used for the Perl snippet.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 13 Aug 2008 20:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247511#M687593</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-13T20:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: A few sed questions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247512#M687594</link>
      <description>&amp;gt;JRF: awk looks like this:&lt;BR /&gt;&lt;BR /&gt;You are missing the last line:&lt;BR /&gt;awk '&lt;BR /&gt;{&lt;BR /&gt;if (/^ifeq/) {&lt;BR /&gt;   sub("install","NEWINSTALL",hold)&lt;BR /&gt;}&lt;BR /&gt;if (NR&amp;gt;1) {print hold}&lt;BR /&gt;hold=$0&lt;BR /&gt;}&lt;BR /&gt;END {print hold}' file</description>
      <pubDate>Wed, 13 Aug 2008 21:02:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-few-sed-questions/m-p/4247512#M687594</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-13T21:02:12Z</dc:date>
    </item>
  </channel>
</rss>

