<?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: Script question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922286#M286129</link>
    <description>Sorry. For just the 1st line:&lt;BR /&gt;&lt;BR /&gt;cat file.txt | sed -e '1 s/\(.\{99\}\).\(.*\)/\1Q\2/'&lt;BR /&gt;&lt;BR /&gt;So, to fix all txt files in a directory:&lt;BR /&gt;&lt;BR /&gt;for i in `ls *.txt`&lt;BR /&gt;do&lt;BR /&gt;cat $i | sed -e '1 s/\(.\{99\}\).\(.*\)/\1Q\2/' &amp;gt; $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Test it first, though ;-)</description>
    <pubDate>Mon, 08 Jan 2007 05:42:07 GMT</pubDate>
    <dc:creator>Wouter Jagers</dc:creator>
    <dc:date>2007-01-08T05:42:07Z</dc:date>
    <item>
      <title>Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922284#M286127</link>
      <description>Hello admins&lt;BR /&gt;&lt;BR /&gt;I have a bunch of files where i need to replace the 100th Charecter in the fist line of each file by new charecter&lt;BR /&gt;&lt;BR /&gt;Any help will be great</description>
      <pubDate>Mon, 08 Jan 2007 05:22:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922284#M286127</guid>
      <dc:creator>George Chechakunnil</dc:creator>
      <dc:date>2007-01-08T05:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922285#M286128</link>
      <description>Hiya,&lt;BR /&gt;&lt;BR /&gt;cat file.txt | sed -e 's/\(.\{99\}\).\(.*\)/\1Q\2/'&lt;BR /&gt;&lt;BR /&gt;Where the 'Q' is your 'new' character.&lt;BR /&gt;&lt;BR /&gt;Hope that helps,&lt;BR /&gt;Cheers&lt;BR /&gt;Wout</description>
      <pubDate>Mon, 08 Jan 2007 05:37:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922285#M286128</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-01-08T05:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922286#M286129</link>
      <description>Sorry. For just the 1st line:&lt;BR /&gt;&lt;BR /&gt;cat file.txt | sed -e '1 s/\(.\{99\}\).\(.*\)/\1Q\2/'&lt;BR /&gt;&lt;BR /&gt;So, to fix all txt files in a directory:&lt;BR /&gt;&lt;BR /&gt;for i in `ls *.txt`&lt;BR /&gt;do&lt;BR /&gt;cat $i | sed -e '1 s/\(.\{99\}\).\(.*\)/\1Q\2/' &amp;gt; $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Test it first, though ;-)</description>
      <pubDate>Mon, 08 Jan 2007 05:42:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922286#M286129</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-01-08T05:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922287#M286130</link>
      <description>George,&lt;BR /&gt;sed '1 s/./a/100' a.lis &amp;gt; b.lis&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Jan 2007 05:48:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922287#M286130</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-08T05:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922288#M286131</link>
      <description>Of course ! /100 for the 100th occurence..  I could have thought of that.. Points to Peter for an even simpler solution :-)</description>
      <pubDate>Mon, 08 Jan 2007 06:42:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922288#M286131</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-01-08T06:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922289#M286132</link>
      <description>pls let me know the command to insert a charater or a word at 100th position, if the 100th column is blank space..</description>
      <pubDate>Mon, 08 Jan 2007 08:08:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922289#M286132</guid>
      <dc:creator>vthiru</dc:creator>
      <dc:date>2007-01-08T08:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922290#M286133</link>
      <description>Try this combination of the above:&lt;BR /&gt;&lt;BR /&gt;sed -e '/^.\{99\}[ ]/ s/./ your text /100' yourfile.txt&lt;BR /&gt;&lt;BR /&gt;Translation: on lines which start with 99 characters and then have a space, replace the 100th character with " your text ".&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Mon, 08 Jan 2007 10:47:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3922290#M286133</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-01-08T10:47:38Z</dc:date>
    </item>
  </channel>
</rss>

