<?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 Delete first lines from text file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870445#M98307</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to delete the first lines from text file and keep only the last 50 lines of the file. How can I do it ? Using sed ?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Mauro</description>
    <pubDate>Thu, 26 Dec 2002 17:15:57 GMT</pubDate>
    <dc:creator>Mauro_8</dc:creator>
    <dc:date>2002-12-26T17:15:57Z</dc:date>
    <item>
      <title>Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870445#M98307</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to delete the first lines from text file and keep only the last 50 lines of the file. How can I do it ? Using sed ?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Mauro</description>
      <pubDate>Thu, 26 Dec 2002 17:15:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870445#M98307</guid>
      <dc:creator>Mauro_8</dc:creator>
      <dc:date>2002-12-26T17:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870446#M98308</link>
      <description>Hi Mauro,&lt;BR /&gt;&lt;BR /&gt;You can use tail -50 fichname &amp;gt; fichtmp&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Thu, 26 Dec 2002 17:24:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870446#M98308</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-12-26T17:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870447#M98309</link>
      <description>Easy way would be..&lt;BR /&gt;&lt;BR /&gt;tail -50 filename &amp;gt; newname&lt;BR /&gt;&lt;BR /&gt;-USA..</description>
      <pubDate>Thu, 26 Dec 2002 17:24:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870447#M98309</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2002-12-26T17:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870448#M98310</link>
      <description>Hi Mauro,&lt;BR /&gt;&lt;BR /&gt;With sed is like:&lt;BR /&gt;num=`wc -l fich| cut -d" " -f1`&lt;BR /&gt;(( num1=num - 50 ))&lt;BR /&gt;sed -e ''$num1','$num'd' fich &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Dec 2002 17:38:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870448#M98310</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-12-26T17:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870449#M98311</link>
      <description>Hi Again,&lt;BR /&gt;&lt;BR /&gt;You must observe that in this line:&lt;BR /&gt;sed -e ''$num1','$num'd' fich &lt;BR /&gt;before $ character are two ' characters and not one ".&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Thu, 26 Dec 2002 17:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870449#M98311</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-12-26T17:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870450#M98312</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I just want to open the file, delete the lines and close it without distroying the file because this file is a log file and a process writes in this file continuosly if I have to rename to a temp file and then back it to orginal name this process will lose the point.&lt;BR /&gt;&lt;BR /&gt;Thanks once more,&lt;BR /&gt;Mauro</description>
      <pubDate>Thu, 26 Dec 2002 18:08:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870450#M98312</guid>
      <dc:creator>Mauro_8</dc:creator>
      <dc:date>2002-12-26T18:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Delete first lines from text file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870451#M98313</link>
      <description>&lt;BR /&gt;tail -50 logfile &amp;gt; newfile&lt;BR /&gt;cat newfile &amp;gt; logfile&lt;BR /&gt;&lt;BR /&gt;This won't close the pointer to the file. You have a slight risk of loosing data if it was written to the log file after the "tail" but before the "cat" command.&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Dec 2002 18:31:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-first-lines-from-text-file/m-p/2870451#M98313</guid>
      <dc:creator>Nelson Mina</dc:creator>
      <dc:date>2002-12-26T18:31:06Z</dc:date>
    </item>
  </channel>
</rss>

