<?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: Modify file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653093#M677097</link>
    <description>Thanks John!</description>
    <pubDate>Fri, 25 Jun 2010 20:03:58 GMT</pubDate>
    <dc:creator>Allanm</dc:creator>
    <dc:date>2010-06-25T20:03:58Z</dc:date>
    <item>
      <title>Modify file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653090#M677094</link>
      <description>I have an html file like the following and I need to remove the leading line numbers from it to have just the html file with me. Can you tell me the way to remove those through sed and perl or something better.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan&lt;BR /&gt;&lt;BR /&gt;&lt;TITLE&gt;First CGI Form&lt;/TITLE&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;BR /&gt;1 &lt;FORM action="https://community.hpe.com/cgi-bin/form1.cgi" method="GET"&gt;&lt;BR /&gt;&lt;BR /&gt;2 Please enter your name: &lt;BR /&gt;&lt;BR /&gt;3 &lt;INPUT type="text" size="50" name="Name" /&gt;&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;Please enter your phone number: &lt;BR /&gt;&lt;BR /&gt;4 &lt;INPUT type="text" size="30" name="Phone" /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;5 &lt;INPUT type="SUBMIT" value="Send" /&gt;&lt;BR /&gt;&lt;INPUT type="RESET" value="Clear" /&gt;&lt;BR /&gt;6 &lt;/P&gt;&lt;/FORM&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Jun 2010 18:58:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653090#M677094</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-06-25T18:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Modify file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653091#M677095</link>
      <description>&lt;!--!*#--&gt;Knowing practically nothing about what's in&lt;BR /&gt;the file, it's hard to guarantee that&lt;BR /&gt;anything simple won't corrupt the data, but&lt;BR /&gt;you could try something simple with "sed":&lt;BR /&gt;&lt;BR /&gt;$ echo '127 &lt;FORM action="/c' | sed -e 's/^[0-9]*//'&amp;lt;BR /&amp;gt; &amp;lt;FORM ACTION="&gt;$&lt;BR /&gt;&lt;BR /&gt;      man sed&lt;/FORM&gt;</description>
      <pubDate>Fri, 25 Jun 2010 19:32:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653091#M677095</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-06-25T19:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modify file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653092#M677096</link>
      <description>sed -e "s/[0-9]* //" yourfilename &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;cat yourfilename | sed -e "s/[0-9]* //" &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;example 1 being a single change from a file,&lt;BR /&gt;and example 2 being the edit from a pipe stream.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Jun 2010 19:41:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653092#M677096</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-25T19:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653093#M677097</link>
      <description>Thanks John!</description>
      <pubDate>Fri, 25 Jun 2010 20:03:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653093#M677097</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2010-06-25T20:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Modify file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653094#M677098</link>
      <description>&lt;!--!*#--&gt;What?  You needed someone to tell you to use&lt;BR /&gt;a pipe, too?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] 's/^[0-9]*//'&lt;BR /&gt;&lt;BR /&gt;Leaves the white space.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; "s/[0-9]* //"&lt;BR /&gt;&lt;BR /&gt;Expects at least one space, and removes one.&lt;BR /&gt;&lt;BR /&gt;      's/^[0-9]*[ \t]*//'&lt;BR /&gt;&lt;BR /&gt;(where "\t" may need to be a literal Tab&lt;BR /&gt;character)&lt;BR /&gt;&lt;BR /&gt;Removes all white space (space and or tab&lt;BR /&gt;characters) after the number).&lt;BR /&gt;&lt;BR /&gt;As usual, many things are possible.</description>
      <pubDate>Fri, 25 Jun 2010 23:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653094#M677098</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-06-25T23:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modify file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653095#M677099</link>
      <description>Allan,&lt;BR /&gt;&lt;BR /&gt;I just read Steve's posting, and his is more correct, in that he is making sure that the numbers you're pulling out are at the beginning of the line while my sed example does not.&lt;BR /&gt;&lt;BR /&gt;What I put as:&lt;BR /&gt; sed -e "s/[0-9]* //"&lt;BR /&gt;&lt;BR /&gt;Should be like Steve's example and read:&lt;BR /&gt; sed -e "s/^[0-9]* //"&lt;BR /&gt;&lt;BR /&gt;That carat symbol "^" tells that sed command to find a numeric sequence at the start of a line, which is more correct to what you're needing. My suggested code from a few days back would remove the ones at the beginning of the line, but also in other places as well. &lt;BR /&gt; &lt;BR /&gt;Please make sure to add the carat "^" symbol before the brace "[" character.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jun 2010 18:17:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modify-file/m-p/4653095#M677099</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-29T18:17:02Z</dc:date>
    </item>
  </channel>
</rss>

