<?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 help needed. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311514#M185682</link>
    <description>&lt;BR /&gt;Sunil,&lt;BR /&gt;&lt;BR /&gt;If by $LINE you mean each line of each file, then you could change $LINE to FILE_PATTERN (e.g., 2004_Jun*.log), and change this:&lt;BR /&gt;&lt;BR /&gt;grep -h 'APPLNAME= MAESTRO=' $LINE &lt;BR /&gt;grep -h 'ls:BEGIN' $LINE &lt;BR /&gt;grep -h 'ds:END' $LINE &lt;BR /&gt;&lt;BR /&gt;to this:&lt;BR /&gt;&lt;BR /&gt;grep -h -e 'APPLNAME= MAESTRO=' -e 'ls:BEGIN' -e 'ds:END' FILE_PATTERN&lt;BR /&gt;&lt;BR /&gt;Does that help?&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Jun 2004 14:29:02 GMT</pubDate>
    <dc:creator>Robert A. Pierce</dc:creator>
    <dc:date>2004-06-23T14:29:02Z</dc:date>
    <item>
      <title>Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311507#M185675</link>
      <description>&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;my requirement, I have multiple files .Now i want to read each line of each file.; and do the following grep in each line one after another.&lt;BR /&gt;grep -h 'APPLNAME= MAESTRO=' $LINE  &lt;BR /&gt;   grep -h 'ls:BEGIN' $LINE  &lt;BR /&gt;   grep -h 'ds:END' $LINE &lt;BR /&gt;end.&lt;BR /&gt;&lt;BR /&gt;how can i do that.&lt;BR /&gt;&lt;BR /&gt;Can anyone help...&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Sunil.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jun 2004 02:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311507#M185675</guid>
      <dc:creator>sunil_34</dc:creator>
      <dc:date>2004-06-22T02:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311508#M185676</link>
      <description>Sunil,&lt;BR /&gt; &lt;BR /&gt;I think you are more specific about your requirements, we might be able to do what you want without ging through line by line and doing a grep.  That way is really slow.&lt;BR /&gt; &lt;BR /&gt;Let us know what you really want:)</description>
      <pubDate>Tue, 22 Jun 2004 02:26:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311508#M185676</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-22T02:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311509#M185677</link>
      <description>the requirement is that a diractory has say 12 files which are log files of different days. i ant to find the grep arguments &lt;BR /&gt;from the files line by line and save it in a file in that order. In short i want to &lt;BR /&gt;record the application name and start and end time from the log files to a different&lt;BR /&gt;file.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jun 2004 02:33:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311509#M185677</guid>
      <dc:creator>sunil_34</dc:creator>
      <dc:date>2004-06-22T02:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311510#M185678</link>
      <description>Is this what you need?&lt;BR /&gt;&lt;BR /&gt;for i in `ls`&lt;BR /&gt;do&lt;BR /&gt;grep -h "search string" $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Tue, 22 Jun 2004 02:34:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311510#M185678</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-06-22T02:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311511#M185679</link>
      <description>Sanjay,&lt;BR /&gt;&lt;BR /&gt;the ls argument gives me file wise i want line wise .i.e line by line for say four diff. files</description>
      <pubDate>Tue, 22 Jun 2004 02:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311511#M185679</guid>
      <dc:creator>sunil_34</dc:creator>
      <dc:date>2004-06-22T02:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311512#M185680</link>
      <description>Check this&lt;BR /&gt;&lt;BR /&gt;for i in `ls`&lt;BR /&gt;do&lt;BR /&gt; for j in `cat $i`&lt;BR /&gt; do&lt;BR /&gt;  grep -h "search string" $j&lt;BR /&gt; done&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Tue, 22 Jun 2004 02:47:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311512#M185680</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-06-22T02:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311513#M185681</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you could do this:&lt;BR /&gt;&lt;BR /&gt;for i in `ls`&lt;BR /&gt;do&lt;BR /&gt;     while read line&lt;BR /&gt;     do&lt;BR /&gt;         grep "pattern"&lt;BR /&gt;         some more operation&lt;BR /&gt;     done &amp;lt; $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Hope this fits your requirement.&lt;BR /&gt;&lt;BR /&gt;manish</description>
      <pubDate>Tue, 22 Jun 2004 03:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311513#M185681</guid>
      <dc:creator>Manish Srivastava</dc:creator>
      <dc:date>2004-06-22T03:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311514#M185682</link>
      <description>&lt;BR /&gt;Sunil,&lt;BR /&gt;&lt;BR /&gt;If by $LINE you mean each line of each file, then you could change $LINE to FILE_PATTERN (e.g., 2004_Jun*.log), and change this:&lt;BR /&gt;&lt;BR /&gt;grep -h 'APPLNAME= MAESTRO=' $LINE &lt;BR /&gt;grep -h 'ls:BEGIN' $LINE &lt;BR /&gt;grep -h 'ds:END' $LINE &lt;BR /&gt;&lt;BR /&gt;to this:&lt;BR /&gt;&lt;BR /&gt;grep -h -e 'APPLNAME= MAESTRO=' -e 'ls:BEGIN' -e 'ds:END' FILE_PATTERN&lt;BR /&gt;&lt;BR /&gt;Does that help?&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jun 2004 14:29:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-help-needed/m-p/3311514#M185682</guid>
      <dc:creator>Robert A. Pierce</dc:creator>
      <dc:date>2004-06-23T14:29:02Z</dc:date>
    </item>
  </channel>
</rss>

