<?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: Shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798837#M720636</link>
    <description>You've had several responses that look like they should work. Since you haven't assigned points, I assume that none of the solutions provided are what you are looking for.&lt;BR /&gt;&lt;BR /&gt;Now that you have supplied the data, the above solutions can be made to work by putting a "^" in front of the "10" and one in front of the "99", since these numbers appear at the front of the line.&lt;BR /&gt;&lt;BR /&gt;Was their something else that you wanted done to the data?&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
    <pubDate>Tue, 03 Sep 2002 17:38:15 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2002-09-03T17:38:15Z</dc:date>
    <item>
      <title>Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798831#M720630</link>
      <description>Could you please help me out for a better and simple Unix script for the following conditions:&lt;BR /&gt;The input file (either fixed length or tab delimited) contains a header (i.e. first line) and footer (i.e. last line), and detail records. Each header contains constant value of '10' and each footer contains a constant value of '99'. The input file should be split into 2 files, one file with only header and footer, and the second file with only detail records.&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Sep 2002 15:52:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798831#M720630</guid>
      <dc:creator>Srinivas_20</dc:creator>
      <dc:date>2002-09-03T15:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798832#M720631</link>
      <description>HI&lt;BR /&gt;&lt;BR /&gt;Can you attach an example file ?&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Tue, 03 Sep 2002 16:00:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798832#M720631</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-09-03T16:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798833#M720632</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# sed -n -e /10/p -e /99/p file.in &amp;gt; file.hdr&lt;BR /&gt;&lt;BR /&gt;# sed -e /10/d -e /99/d file.in &amp;gt; file.details&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...   &lt;BR /&gt;</description>
      <pubDate>Tue, 03 Sep 2002 16:03:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798833#M720632</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-03T16:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798834#M720633</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Grep version:&lt;BR /&gt;&lt;BR /&gt;grep -v -e "10" -e "99" infile &amp;gt; outfile&lt;BR /&gt;grep -e "10" -e "99" infile &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 03 Sep 2002 16:06:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798834#M720633</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-09-03T16:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798835#M720634</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you prefer a general script that snips the first and last lines from a file, regardless of content, use something like:&lt;BR /&gt;&lt;BR /&gt;# sed -n -e '1p' -e '$p' file.in &amp;gt; file.hdr&lt;BR /&gt;&lt;BR /&gt;# sed -e '1d' -e '$d' file.in &amp;gt; file.det&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 03 Sep 2002 17:12:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798835#M720634</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-03T17:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798836#M720635</link>
      <description>Thank you guys for your quick response. Anyway here is the sample output file that it looks like&lt;BR /&gt;10 MSV024 20020822 175149&lt;BR /&gt;20 40392 Jones,Donald P 46916 7290 6545315 107 EDA&lt;BR /&gt;20 42409 Miller,Jacob S 32384 7290 6545315 107 KEA&lt;BR /&gt;20 44656 Davis,Rick 38608 1011 7950607 006 116&lt;BR /&gt;20 45908 Smith,Cary 40476 9505 9005165 011 616&lt;BR /&gt;99 4&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Sep 2002 17:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798836#M720635</guid>
      <dc:creator>Srinivas_20</dc:creator>
      <dc:date>2002-09-03T17:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798837#M720636</link>
      <description>You've had several responses that look like they should work. Since you haven't assigned points, I assume that none of the solutions provided are what you are looking for.&lt;BR /&gt;&lt;BR /&gt;Now that you have supplied the data, the above solutions can be made to work by putting a "^" in front of the "10" and one in front of the "99", since these numbers appear at the front of the line.&lt;BR /&gt;&lt;BR /&gt;Was their something else that you wanted done to the data?&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Tue, 03 Sep 2002 17:38:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2798837#M720636</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-09-03T17:38:15Z</dc:date>
    </item>
  </channel>
</rss>

