<?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: need sed help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688374#M794757</link>
    <description>Here's another way&lt;BR /&gt;&lt;BR /&gt;sed -n '1,/XXXX/!p' filename&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom&lt;BR /&gt;</description>
    <pubDate>Fri, 09 Dec 2005 09:10:52 GMT</pubDate>
    <dc:creator>Tom Ward_1</dc:creator>
    <dc:date>2005-12-09T09:10:52Z</dc:date>
    <item>
      <title>need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688372#M794755</link>
      <description>I want to delete lines from a file, from the first line to the first occurrence of a string XXXXX within the file.&lt;BR /&gt;Can you help me to give me the sed right command to do this.&lt;BR /&gt;thanks.</description>
      <pubDate>Fri, 09 Dec 2005 08:58:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688372#M794755</guid>
      <dc:creator>LAFDAL_1</dc:creator>
      <dc:date>2005-12-09T08:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688373#M794756</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;By example:&lt;BR /&gt;&lt;BR /&gt;# sed -ne '1,/localhost/d;p' /etc/hosts&lt;BR /&gt;&lt;BR /&gt;Change /localhost/ to the pattern you want to match, and (obviously) substitute your file name for '/etc/hosts'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;..JRF...</description>
      <pubDate>Fri, 09 Dec 2005 09:03:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688373#M794756</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-09T09:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688374#M794757</link>
      <description>Here's another way&lt;BR /&gt;&lt;BR /&gt;sed -n '1,/XXXX/!p' filename&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Dec 2005 09:10:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688374#M794757</guid>
      <dc:creator>Tom Ward_1</dc:creator>
      <dc:date>2005-12-09T09:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688375#M794758</link>
      <description>Thanks, &lt;BR /&gt;it works fine.&lt;BR /&gt;But how can i do if the string "localhost" is a variable. That is declared as $localhost</description>
      <pubDate>Fri, 09 Dec 2005 09:45:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688375#M794758</guid>
      <dc:creator>LAFDAL_1</dc:creator>
      <dc:date>2005-12-09T09:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688376#M794759</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;OK, do this:&lt;BR /&gt;&lt;BR /&gt;# pat=localhost;sed -ne "1,/$pat/!p" /etc/hosts&lt;BR /&gt;&lt;BR /&gt;Note the use of the double quote marks.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Dec 2005 10:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688376#M794759</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-09T10:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688377#M794760</link>
      <description>Ok thanks&lt;BR /&gt;It works fine.</description>
      <pubDate>Fri, 09 Dec 2005 13:15:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688377#M794760</guid>
      <dc:creator>LAFDAL_1</dc:creator>
      <dc:date>2005-12-09T13:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: need sed help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688378#M794761</link>
      <description>Hi,&lt;BR /&gt;just a note: the command&lt;BR /&gt;sed -ne "1,/$pat/!p" /etc/hosts&lt;BR /&gt;runs fine but doens't remove the entry in the /etc/hosts file. It simply show at the screen the result. &lt;BR /&gt;To remove them to have to use:&lt;BR /&gt;&lt;BR /&gt;sed -ne "1,/$pat/!p" /etc/hosts&amp;gt;tt&lt;BR /&gt;mv tt /etc/hosts&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Art</description>
      <pubDate>Mon, 12 Dec 2005 04:20:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-sed-help/m-p/3688378#M794761</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2005-12-12T04:20:47Z</dc:date>
    </item>
  </channel>
</rss>

