<?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: How Do I in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998480#M125909</link>
    <description>You can use vi for this quite easily, instead of cat.  Its a little anti-natural to learn, but easy enough once you get used to it.  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
    <pubDate>Mon, 16 Jun 2003 14:12:18 GMT</pubDate>
    <dc:creator>Chris Vail</dc:creator>
    <dc:date>2003-06-16T14:12:18Z</dc:date>
    <item>
      <title>How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998474#M125903</link>
      <description>Greetings all,&lt;BR /&gt;.&lt;BR /&gt;Sorry to trouble you with what's probably a simple problem.&lt;BR /&gt;.&lt;BR /&gt;I have a large text file with information on FC10, Nike and AutoRAID arrays.  I'm trying to pull informatin on these arrays and put the info in another file for manipulation.  Problems is, I can't remember how to pull the next 100 lines from the original file and move them to the second file.&lt;BR /&gt;.&lt;BR /&gt;I currently am using cat to read the original file, then grep to find the line with the header information, and there I'm lost.&lt;BR /&gt;.&lt;BR /&gt;Any help would be greatly appreciated.&lt;BR /&gt;.&lt;BR /&gt;Paul Middleton</description>
      <pubDate>Mon, 16 Jun 2003 13:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998474#M125903</guid>
      <dc:creator>Paul Middleton</dc:creator>
      <dc:date>2003-06-16T13:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998475#M125904</link>
      <description>Hi Paul:&lt;BR /&gt;&lt;BR /&gt;If you want to copy the last 100 lines from a file to a new file try the following:&lt;BR /&gt;&lt;BR /&gt;tail -100 oldfile &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dario</description>
      <pubDate>Mon, 16 Jun 2003 14:02:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998475#M125904</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2003-06-16T14:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998476#M125905</link>
      <description>Hi Paul:&lt;BR /&gt;&lt;BR /&gt;Here's one way.  Assume that you want to begin extracting 100 lines from file where the string named 'token' first appears:&lt;BR /&gt;&lt;BR /&gt;# awk '/token/ {print;for (i==0;i&amp;lt;5;i++) {getline;print}}' inputfile &amp;gt; outputfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 16 Jun 2003 14:10:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998476#M125905</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-06-16T14:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998477#M125906</link>
      <description>You can use sed to pull section of the file based on line numbers .. for example if you want to extract lines 15 to lines 50 (both inclusive) you can do ..&lt;BR /&gt;$ sed -n '15,50p' the-file&lt;BR /&gt;To append these to another file, simply redirect the output with &amp;gt;&amp;gt;.</description>
      <pubDate>Mon, 16 Jun 2003 14:10:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998477#M125906</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-06-16T14:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998478#M125907</link>
      <description>Hi Paul:&lt;BR /&gt;&lt;BR /&gt;/corrected for 100-lines/&lt;BR /&gt;&lt;BR /&gt;Here's one way.  Assume that you want to begin extracting 100 lines from file where the string named 'token' first appears:&lt;BR /&gt;&lt;BR /&gt;# awk '/token/ {print;for (i==0;i&amp;lt;100;i++) {getline;print}}' inputfile &amp;gt; outputfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 16 Jun 2003 14:11:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998478#M125907</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-06-16T14:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998479#M125908</link>
      <description>Thanks for the quick reply, Dario.&lt;BR /&gt;.&lt;BR /&gt;Problem is that the infomation can be anywhere in the file.  What I need is a way to find the matching line in the text file, copy it and/or the next hundred lines to another file, and resume with my searching.&lt;BR /&gt;.&lt;BR /&gt;Regards,&lt;BR /&gt;Paul Middleton</description>
      <pubDate>Mon, 16 Jun 2003 14:11:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998479#M125908</guid>
      <dc:creator>Paul Middleton</dc:creator>
      <dc:date>2003-06-16T14:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998480#M125909</link>
      <description>You can use vi for this quite easily, instead of cat.  Its a little anti-natural to learn, but easy enough once you get used to it.  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 16 Jun 2003 14:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998480#M125909</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-06-16T14:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998481#M125910</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if you want to split the file in chunks of 100 lines, then you only have to use split:&lt;BR /&gt;&lt;BR /&gt;split -l 100 &lt;LOG&gt; &lt;NEWFILE&gt; &lt;BR /&gt;&lt;BR /&gt;will create files named &lt;NEWFILE&gt;aa &lt;NEWFILE&gt;ab and so on.&lt;BR /&gt;&lt;BR /&gt;If you want to have the last 100 lines:&lt;BR /&gt;tail -n 100 &lt;LOG&gt;&lt;BR /&gt;&lt;BR /&gt;If you want to have the 100 lines ending at line X: &lt;BR /&gt;head -n X &lt;LOG&gt;|tail -n 100&lt;BR /&gt;&lt;BR /&gt;You can combine all these commamds with a "grep" command, of course:&lt;BR /&gt;&lt;BR /&gt;grep "header" &lt;LOG&gt; |split -l 100&lt;BR /&gt;works...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;FiX&lt;BR /&gt;&lt;/LOG&gt;&lt;/LOG&gt;&lt;/LOG&gt;&lt;/NEWFILE&gt;&lt;/NEWFILE&gt;&lt;/NEWFILE&gt;&lt;/LOG&gt;</description>
      <pubDate>Mon, 16 Jun 2003 14:15:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998481#M125910</guid>
      <dc:creator>F. X. de Montgolfier</dc:creator>
      <dc:date>2003-06-16T14:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998482#M125911</link>
      <description>Dario - You were close, I'll be using your suggestion in the future.&lt;BR /&gt;S.K.Chan - Good idea, it will be usefull in the future.&lt;BR /&gt;Chris Vail - VI, are you nuts? I want to finish this project this year !  Remember the saying, Unix is a four-letter word and vi is the abbreviation. &lt;BR /&gt;F.X. de Montfolfier - Good ideas, they will help me down th line.&lt;BR /&gt;.&lt;BR /&gt;James R. Ferguson - Exactly what I needed.  I was part way there, but the spaces were driving me nuts.  (short drive, I could probably walk.)&lt;BR /&gt;.&lt;BR /&gt;Thanks to all for your help.  The forums are as good as bouncing questions off the other C.E.'s when I was with HP in Cleveland.&lt;BR /&gt;.&lt;BR /&gt;Regards,&lt;BR /&gt;Paul Middleton&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jun 2003 16:31:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-i/m-p/2998482#M125911</guid>
      <dc:creator>Paul Middleton</dc:creator>
      <dc:date>2003-06-16T16:31:35Z</dc:date>
    </item>
  </channel>
</rss>

