<?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: VI string manipulation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647432#M45189</link>
    <description>cat file | sed -e "s/BOB/FRANK/g"&lt;BR /&gt;</description>
    <pubDate>Thu, 17 Jan 2002 16:21:31 GMT</pubDate>
    <dc:creator>Jeff Machols</dc:creator>
    <dc:date>2002-01-17T16:21:31Z</dc:date>
    <item>
      <title>VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647431#M45188</link>
      <description>Traditionally my background has been OpenVMS and our company recently purchased a HP UX&lt;BR /&gt;solution. We like some information re: the&lt;BR /&gt;ability on how to take a name in a flat file and using string maipulation change that name to another, for example...&lt;BR /&gt;&lt;BR /&gt;for every occurrance of BOB found change it to FRANK. We like this to be a script that can be&lt;BR /&gt;launched via Crontab.&lt;BR /&gt;&lt;BR /&gt;-barry donovan</description>
      <pubDate>Thu, 17 Jan 2002 16:19:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647431#M45188</guid>
      <dc:creator>James Barry Donovan</dc:creator>
      <dc:date>2002-01-17T16:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647432#M45189</link>
      <description>cat file | sed -e "s/BOB/FRANK/g"&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Jan 2002 16:21:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647432#M45189</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2002-01-17T16:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647433#M45190</link>
      <description>&lt;BR /&gt;You need to use the sed command to it;&lt;BR /&gt;&lt;BR /&gt;eg. if you have a file called tt.txt then;&lt;BR /&gt;&lt;BR /&gt;cat tt.txt | sed 's/BOB/FRED/g' &amp;gt; &lt;NEWFILENAME&gt;&lt;/NEWFILENAME&gt;</description>
      <pubDate>Thu, 17 Jan 2002 16:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647433#M45190</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-01-17T16:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647434#M45191</link>
      <description>actually you don't even need the cat&lt;BR /&gt;&lt;BR /&gt;sed -e "s/BOB/FRANK/g" file &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Jan 2002 16:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647434#M45191</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2002-01-17T16:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647435#M45192</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# sed -e 's/BOB/FRANK/g' myfile &amp;gt; myfile.fixed&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 17 Jan 2002 16:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647435#M45192</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-01-17T16:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647436#M45193</link>
      <description>As mentioned sed is your answer&lt;BR /&gt;&lt;BR /&gt;sed 's/BOB/FRANK/g' filename &amp;gt; filename2&lt;BR /&gt;&lt;BR /&gt;If you want to create a lot of changes the create a sed script file called sedfile&lt;BR /&gt;&lt;BR /&gt;s/BOB/FRANK/g&lt;BR /&gt;S/CRAIG/JOE/g&lt;BR /&gt;&lt;BR /&gt;then call it from the command line&lt;BR /&gt;&lt;BR /&gt;sed -f sedfile filename &amp;gt; filename2&lt;BR /&gt;&lt;BR /&gt;GL,&lt;BR /&gt;C</description>
      <pubDate>Thu, 17 Jan 2002 16:26:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647436#M45193</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2002-01-17T16:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647437#M45194</link>
      <description>Also if you wanted to do your change while vi'ing the file&lt;BR /&gt;&lt;BR /&gt;:%s/BOB/Frank/g&lt;BR /&gt;&lt;BR /&gt;Make sure you have escaped command mode before entering this.&lt;BR /&gt;&lt;BR /&gt;C</description>
      <pubDate>Thu, 17 Jan 2002 16:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647437#M45194</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2002-01-17T16:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: VI string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647438#M45195</link>
      <description>Same result with awk:&lt;BR /&gt;&lt;BR /&gt;awk '{gsub(/BOB/, FRANK, $0);print}' filename &amp;gt; filename.new</description>
      <pubDate>Thu, 17 Jan 2002 16:58:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/vi-string-manipulation/m-p/2647438#M45195</guid>
      <dc:creator>Jim Booker</dc:creator>
      <dc:date>2002-01-17T16:58:59Z</dc:date>
    </item>
  </channel>
</rss>

