<?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 search and replace in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705994#M613176</link>
    <description>Hi, &lt;BR /&gt;i have seen many search and replace posts.. but this issue i am not seeing..&lt;BR /&gt;&lt;BR /&gt;1. in vi editor how to control the search and replace only in first 50 lines or from curser the next 50 lines or between line numbers 20 to 70?&lt;BR /&gt;2. i am having a string &lt;BR /&gt;OBJECT "&amp;lt;$1&amp;gt;"&lt;BR /&gt;OBJECT "NT"&lt;BR /&gt;OBJECT "NT_OS"&lt;BR /&gt;like these...&lt;BR /&gt;i would like to search for OBJECT "NT* and replace them with OBJECT "abc$1"&lt;BR /&gt;or OBJECT "N&amp;lt;&amp;gt; ---i want to search for string starting with N and it should have only x number of characters...so that i can control, whether NT or NT_OS will get replaced.&lt;BR /&gt;&lt;BR /&gt;thanks...</description>
    <pubDate>Thu, 28 Oct 2010 00:16:33 GMT</pubDate>
    <dc:creator>sekar sundaram</dc:creator>
    <dc:date>2010-10-28T00:16:33Z</dc:date>
    <item>
      <title>search and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705994#M613176</link>
      <description>Hi, &lt;BR /&gt;i have seen many search and replace posts.. but this issue i am not seeing..&lt;BR /&gt;&lt;BR /&gt;1. in vi editor how to control the search and replace only in first 50 lines or from curser the next 50 lines or between line numbers 20 to 70?&lt;BR /&gt;2. i am having a string &lt;BR /&gt;OBJECT "&amp;lt;$1&amp;gt;"&lt;BR /&gt;OBJECT "NT"&lt;BR /&gt;OBJECT "NT_OS"&lt;BR /&gt;like these...&lt;BR /&gt;i would like to search for OBJECT "NT* and replace them with OBJECT "abc$1"&lt;BR /&gt;or OBJECT "N&amp;lt;&amp;gt; ---i want to search for string starting with N and it should have only x number of characters...so that i can control, whether NT or NT_OS will get replaced.&lt;BR /&gt;&lt;BR /&gt;thanks...</description>
      <pubDate>Thu, 28 Oct 2010 00:16:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705994#M613176</guid>
      <dc:creator>sekar sundaram</dc:creator>
      <dc:date>2010-10-28T00:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: search and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705995#M613177</link>
      <description>to replce something from line  20 to 70&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;:20,70s/abc/pqr&lt;BR /&gt;&lt;BR /&gt;it says replace all occurrence "abc" with "pqr"&lt;BR /&gt;from line 20 to line 70.&lt;BR /&gt;&lt;BR /&gt;by the way you can see lines in vi with&lt;BR /&gt;:set nu&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;Kapil+</description>
      <pubDate>Thu, 28 Oct 2010 01:30:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705995#M613177</guid>
      <dc:creator>Kapil Jha</dc:creator>
      <dc:date>2010-10-28T01:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: search and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705996#M613178</link>
      <description>&amp;gt;so that I can control, whether NT or NT_OS will get replaced.&lt;BR /&gt;&lt;BR /&gt;If you only have two choices, you can just limit it with \&amp;lt; and or \&amp;gt;&lt;BR /&gt;:s/NT\&amp;gt;/abc$1/&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Kapil: to replace something from line 20 to 70&lt;BR /&gt;&lt;BR /&gt;If you don't want line numbers, you can change from one mark to another:&lt;BR /&gt;:'a,'bs/abc/pqr/</description>
      <pubDate>Thu, 28 Oct 2010 07:37:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705996#M613178</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-28T07:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: search and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705997#M613179</link>
      <description>thanks Kapil, Dennis...&lt;BR /&gt;&lt;BR /&gt;one more question:&lt;BR /&gt;how to search for a string and replace its whole line(with confirmation)?&lt;BR /&gt;i mean, &lt;BR /&gt;:%s/OBJECT*/OBJECT "NT"/gc&lt;BR /&gt;&lt;BR /&gt;OBJECT* -- i wanted to search for the line OBJECT "_ _ _ _ ..." and replace it with OBJECT "NT" &lt;BR /&gt;</description>
      <pubDate>Thu, 28 Oct 2010 08:55:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705997#M613179</guid>
      <dc:creator>sekar sundaram</dc:creator>
      <dc:date>2010-10-28T08:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: search and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705998#M613180</link>
      <description>&lt;!--!*#--&gt;&lt;BR /&gt; 1. in vi editor how to control the search and replace only in first 50 lines or from curser the next 50 lines or between line numbers 20 to 70?&lt;BR /&gt;&lt;BR /&gt;   :1,50s/&lt;SEARCH pattern=""&gt;/&lt;REPLACE string=""&gt;&lt;BR /&gt;   :20,70s/&lt;SEARCH pattern=""&gt;/&lt;REPLACE string=""&gt;&lt;BR /&gt;&lt;BR /&gt;  This will replace only the first occurance of the pattern in the given line. To replace all occurances of &lt;SEARCH pattern=""&gt; with &lt;REPLACE string=""&gt; append the search with 'g'&lt;BR /&gt;&lt;BR /&gt;   :1,50s/&lt;SEARCH pattern=""&gt;/&lt;REPLACE string=""&gt;/g&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;   &lt;BR /&gt;&lt;/REPLACE&gt;&lt;/SEARCH&gt;&lt;/REPLACE&gt;&lt;/SEARCH&gt;&lt;/REPLACE&gt;&lt;/SEARCH&gt;&lt;/REPLACE&gt;&lt;/SEARCH&gt;</description>
      <pubDate>Fri, 29 Oct 2010 04:32:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705998#M613180</guid>
      <dc:creator>muruganantham raju</dc:creator>
      <dc:date>2010-10-29T04:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: search and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705999#M613181</link>
      <description>To replace OBJECT "_ _ _ _ ..." with OBJECT "NT"&lt;BR /&gt;&lt;BR /&gt; :%s/OBJECT.*/OBJECT "NT"/gc&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Oct 2010 04:38:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace/m-p/4705999#M613181</guid>
      <dc:creator>muruganantham raju</dc:creator>
      <dc:date>2010-10-29T04:38:03Z</dc:date>
    </item>
  </channel>
</rss>

