<?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 Shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180672#M682680</link>
    <description>Hi, &lt;BR /&gt; &lt;BR /&gt;I've 2 files : &lt;BR /&gt;1) 'main.txt' with the following 10 lines content : &lt;BR /&gt;one-one-one-one &lt;BR /&gt;two-two-two-two &lt;BR /&gt;three-three-three-three &lt;BR /&gt;four-four-four-four &lt;BR /&gt;five-five-five-five &lt;BR /&gt;six-six-six-six &lt;BR /&gt;seven-seven-seven-seven &lt;BR /&gt;eight-eight-eight-eight &lt;BR /&gt;nine-nine-nine-nine &lt;BR /&gt;ten-ten-ten-ten &lt;BR /&gt; &lt;BR /&gt;2) 'sub.txt' whith the following 5 lines content : &lt;BR /&gt;1 &lt;BR /&gt;3 &lt;BR /&gt;5 &lt;BR /&gt;7 &lt;BR /&gt;9 &lt;BR /&gt; &lt;BR /&gt;I want to write a script to read the content from 'sub.txt', and &lt;BR /&gt;extract the n+1 (n is the number in sub.txt content)line from &lt;BR /&gt;'main.txt' file. &lt;BR /&gt;Therefore, the output extracted from 'main.txt' will be : &lt;BR /&gt;two-two-two-two &lt;BR /&gt;four-four-four-four &lt;BR /&gt;six-six-six-six &lt;BR /&gt;eight-eight-eight-eight &lt;BR /&gt;ten-ten-ten-ten &lt;BR /&gt; &lt;BR /&gt;Pls advise.&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;Chin&lt;BR /&gt;11-Jun-09 @3:35pm</description>
    <pubDate>Thu, 11 Jun 2009 06:34:25 GMT</pubDate>
    <dc:creator>PARK FOH CHIN</dc:creator>
    <dc:date>2009-06-11T06:34:25Z</dc:date>
    <item>
      <title>Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180672#M682680</link>
      <description>Hi, &lt;BR /&gt; &lt;BR /&gt;I've 2 files : &lt;BR /&gt;1) 'main.txt' with the following 10 lines content : &lt;BR /&gt;one-one-one-one &lt;BR /&gt;two-two-two-two &lt;BR /&gt;three-three-three-three &lt;BR /&gt;four-four-four-four &lt;BR /&gt;five-five-five-five &lt;BR /&gt;six-six-six-six &lt;BR /&gt;seven-seven-seven-seven &lt;BR /&gt;eight-eight-eight-eight &lt;BR /&gt;nine-nine-nine-nine &lt;BR /&gt;ten-ten-ten-ten &lt;BR /&gt; &lt;BR /&gt;2) 'sub.txt' whith the following 5 lines content : &lt;BR /&gt;1 &lt;BR /&gt;3 &lt;BR /&gt;5 &lt;BR /&gt;7 &lt;BR /&gt;9 &lt;BR /&gt; &lt;BR /&gt;I want to write a script to read the content from 'sub.txt', and &lt;BR /&gt;extract the n+1 (n is the number in sub.txt content)line from &lt;BR /&gt;'main.txt' file. &lt;BR /&gt;Therefore, the output extracted from 'main.txt' will be : &lt;BR /&gt;two-two-two-two &lt;BR /&gt;four-four-four-four &lt;BR /&gt;six-six-six-six &lt;BR /&gt;eight-eight-eight-eight &lt;BR /&gt;ten-ten-ten-ten &lt;BR /&gt; &lt;BR /&gt;Pls advise.&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;Chin&lt;BR /&gt;11-Jun-09 @3:35pm</description>
      <pubDate>Thu, 11 Jun 2009 06:34:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180672#M682680</guid>
      <dc:creator>PARK FOH CHIN</dc:creator>
      <dc:date>2009-06-11T06:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180673#M682681</link>
      <description>Hi,&lt;BR /&gt;see the below script&lt;BR /&gt;&lt;BR /&gt;for i in `cat sub.txt`&lt;BR /&gt;do&lt;BR /&gt;sed -n `expr $i + 1`p main.txt&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Thu, 11 Jun 2009 07:13:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180673#M682681</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-06-11T07:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180674#M682682</link>
      <description>Hi,&lt;BR /&gt;Excellent script - short, simple &amp;amp; powerful.&lt;BR /&gt;Thank you very much.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Chin&lt;BR /&gt;11-Jun-09@6:05pm</description>
      <pubDate>Thu, 11 Jun 2009 09:03:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/5180674#M682682</guid>
      <dc:creator>PARK FOH CHIN</dc:creator>
      <dc:date>2009-06-11T09:03:51Z</dc:date>
    </item>
  </channel>
</rss>

