<?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: character replacemnt in a file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895593#M282145</link>
    <description>Based on the sample input provided here's a sed(1) version that works:&lt;BR /&gt;&lt;BR /&gt;# sed 's/^\(Column[0-9]*\) \(varchar2\) ([0-9]*)/\1 \2 (5000)/p' file&lt;BR /&gt;&lt;BR /&gt;~hope it helps</description>
    <pubDate>Thu, 09 Nov 2006 14:04:04 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-11-09T14:04:04Z</dc:date>
    <item>
      <title>character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895584#M282136</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can someone help me in how to replace globally certain characeters in a file?&lt;BR /&gt;&lt;BR /&gt;Ex:  I have several lines looks like&lt;BR /&gt;&lt;BR /&gt;abcd &amp;lt;1?&lt;BR /&gt;abcd  &amp;lt;20&amp;gt;&lt;BR /&gt;abcd &amp;lt;5&amp;gt;&lt;BR /&gt;abcd &amp;lt;100&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I want to make abcd &amp;lt;5000&amp;gt; for all the occurance of abcd, the value in &amp;lt;&amp;gt; is different.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;Rajim</description>
      <pubDate>Thu, 09 Nov 2006 11:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895584#M282136</guid>
      <dc:creator>sheevm</dc:creator>
      <dc:date>2006-11-09T11:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895585#M282137</link>
      <description>Hi , &lt;BR /&gt;&lt;BR /&gt;Open the file in vi editor &lt;BR /&gt;Go to command mode and &lt;BR /&gt;Then use the following the syntax&lt;BR /&gt;:$s/str1/str2/g&lt;BR /&gt;&lt;BR /&gt;str1 ==&amp;gt;the string pattern to be replaced&lt;BR /&gt;str2 ==&amp;gt;The string which has to be there&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please make sure there is no space in the command&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 11:25:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895585#M282137</guid>
      <dc:creator>siva0123</dc:creator>
      <dc:date>2006-11-09T11:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895586#M282138</link>
      <description>hI,&lt;BR /&gt;&lt;BR /&gt;But str2 has different value on each occurence as you see in my example.  Is there a way to use the wild card&lt;BR /&gt;&lt;BR /&gt;abcd &amp;lt;*&amp;gt; for abcd &amp;lt;1&amp;gt; and abcd &amp;lt;20&amp;gt;  etc...?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 09 Nov 2006 11:31:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895586#M282138</guid>
      <dc:creator>sheevm</dc:creator>
      <dc:date>2006-11-09T11:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895587#M282139</link>
      <description>hello&lt;BR /&gt;&lt;BR /&gt;Then I would do this:&lt;BR /&gt;&lt;BR /&gt;in vi mode type :&lt;BR /&gt;1,$s/abcd &amp;lt;.*&amp;gt;/abcd &amp;lt;5000&amp;gt;/g&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 11:55:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895587#M282139</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T11:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895588#M282140</link>
      <description>sorry, I pressed submit to quickly,&lt;BR /&gt;I wanted to explain what it means.&lt;BR /&gt;&lt;BR /&gt;:1,$ is from line 1 to last line&lt;BR /&gt;&lt;BR /&gt;the .* between &amp;lt; &amp;gt; means any character&lt;BR /&gt;&lt;BR /&gt;good luck&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 11:59:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895588#M282140</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T11:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895589#M282141</link>
      <description>sorry, I pressed submit to quickly,&lt;BR /&gt;I wanted to explain what it means.&lt;BR /&gt;&lt;BR /&gt;:1,$ is from line 1 to last line&lt;BR /&gt;&lt;BR /&gt;the .* between &amp;lt; &amp;gt; means any character and any number of characters.&lt;BR /&gt;&lt;BR /&gt;So that should fit &amp;lt;1&amp;gt; or &amp;lt;100&amp;gt; or &amp;lt;23000&amp;gt;&lt;BR /&gt;whatever , will be changed to &amp;lt;5000&amp;gt;&lt;BR /&gt;&lt;BR /&gt;good luck&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 12:01:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895589#M282141</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T12:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895590#M282142</link>
      <description>sorry, I pressed submit to quickly,&lt;BR /&gt;I wanted to explain what it means.&lt;BR /&gt;&lt;BR /&gt;:1,$ is from line 1 to last line&lt;BR /&gt;&lt;BR /&gt;the .* between &amp;lt; &amp;gt; means any character and any number of characters.&lt;BR /&gt;&lt;BR /&gt;So that should fit &amp;lt;1&amp;gt; or &amp;lt;100&amp;gt; or &amp;lt;23000&amp;gt;&lt;BR /&gt;whatever , will be changed to &amp;lt;5000&amp;gt;&lt;BR /&gt;&lt;BR /&gt;You do not have to repeat the abcd, I &lt;BR /&gt;did that for clarity:&lt;BR /&gt;just the matching pattern which I hope&lt;BR /&gt;in your case is nicely between the &amp;lt; &amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;good luck&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 12:02:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895590#M282142</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T12:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895591#M282143</link>
      <description># sed 's/^abcd &amp;lt;[0-9]*&amp;gt;/abcd &amp;lt;5000&amp;gt;/g' file</description>
      <pubDate>Thu, 09 Nov 2006 12:18:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895591#M282143</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-11-09T12:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895592#M282144</link>
      <description>Frank,&lt;BR /&gt;&lt;BR /&gt;The command you gave did not work.  Here is the sample file.&lt;BR /&gt;&lt;BR /&gt;I want to repalce everything in ()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Column1         varchar2 (1),&lt;BR /&gt;Column2         varchar2 (14),&lt;BR /&gt;Column3         varchar2 (6),&lt;BR /&gt;Column4         varchar2 (4000),&lt;BR /&gt;Column5         varchar2 (4000),&lt;BR /&gt;Column6         varchar2 (10),&lt;BR /&gt;Column7         varchar2 (4000),&lt;BR /&gt;Column8         varchar2 (16),&lt;BR /&gt;Column9         varchar2 (6),&lt;BR /&gt;Column10        varchar2 (28),&lt;BR /&gt;Column11        varchar2 (4),&lt;BR /&gt;Column12        varchar2 (9),&lt;BR /&gt;Column13        varchar2 (1),&lt;BR /&gt;Column14        varchar2 (4000),&lt;BR /&gt;Column15        varchar2 (3),&lt;BR /&gt;Column16        varchar2 (4),&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 09 Nov 2006 12:33:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895592#M282144</guid>
      <dc:creator>sheevm</dc:creator>
      <dc:date>2006-11-09T12:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895593#M282145</link>
      <description>Based on the sample input provided here's a sed(1) version that works:&lt;BR /&gt;&lt;BR /&gt;# sed 's/^\(Column[0-9]*\) \(varchar2\) ([0-9]*)/\1 \2 (5000)/p' file&lt;BR /&gt;&lt;BR /&gt;~hope it helps</description>
      <pubDate>Thu, 09 Nov 2006 14:04:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895593#M282145</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-11-09T14:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: character replacemnt in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895594#M282146</link>
      <description>Hi Rajim&lt;BR /&gt;Sorry I was away for a long weekend.&lt;BR /&gt;I suspect you have your solution already,&lt;BR /&gt;but just to complete my answer to what&lt;BR /&gt;I would have done.&lt;BR /&gt;&lt;BR /&gt;Yes, naturally I base my command on &amp;lt;&amp;gt;,&lt;BR /&gt;when replacing () it becomes a different&lt;BR /&gt;ballgame:&lt;BR /&gt;&lt;BR /&gt;If you want to use it with round brackets,&lt;BR /&gt;do this:&lt;BR /&gt;&lt;BR /&gt;1,$s!char2 (.*)!char2 (5000)!g&lt;BR /&gt;&lt;BR /&gt;Just to illustrate the different effects:&lt;BR /&gt;If you just did&lt;BR /&gt;&lt;BR /&gt;1,$s!(.*)!(5000)!g&lt;BR /&gt;&lt;BR /&gt;It would replace the whole line with (5000).&lt;BR /&gt;The brackets are a bit special.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Nov 2006 01:58:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/character-replacemnt-in-a-file/m-p/3895594#M282146</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-13T01:58:47Z</dc:date>
    </item>
  </channel>
</rss>

