<?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: KSH script - little help? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719960#M62838</link>
    <description>Here is what I uses.&lt;BR /&gt;&lt;BR /&gt;cat foo | while read line ;&lt;BR /&gt;do&lt;BR /&gt;  echo $line&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
    <pubDate>Wed, 08 May 2002 20:28:16 GMT</pubDate>
    <dc:creator>Sachin Patel</dc:creator>
    <dc:date>2002-05-08T20:28:16Z</dc:date>
    <item>
      <title>KSH script - little help?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719959#M62837</link>
      <description>Could some please help me with a little problem I am having.  I have a file, foo,  that I would like to go through with a 'for' loop and interrogate it line by line looking for a certain string.  Here's the problem I am having.  If the line has three words on it:&lt;BR /&gt;200 Records Loaded&lt;BR /&gt;when I do my      for i in `cat foo` ,&lt;BR /&gt;it returns 200, Records, and Loaded as three separate values instead of returning the whole line to me at once.  What I want to do is get the whole line at once, see if it contains the word Loaded, and then echo the line out to a report.  Any suggestions on how I can do this?  Thank you in advance for your help.</description>
      <pubDate>Wed, 08 May 2002 20:17:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719959#M62837</guid>
      <dc:creator>Weary in West Chester</dc:creator>
      <dc:date>2002-05-08T20:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: KSH script - little help?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719960#M62838</link>
      <description>Here is what I uses.&lt;BR /&gt;&lt;BR /&gt;cat foo | while read line ;&lt;BR /&gt;do&lt;BR /&gt;  echo $line&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Wed, 08 May 2002 20:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719960#M62838</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2002-05-08T20:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: KSH script - little help?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719961#M62839</link>
      <description>PERFECT!!!  Thank you so much.  That would be the 10:-)</description>
      <pubDate>Wed, 08 May 2002 20:31:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719961#M62839</guid>
      <dc:creator>Weary in West Chester</dc:creator>
      <dc:date>2002-05-08T20:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: KSH script - little help?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719962#M62840</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One of the solutions is:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;cat foo | while read line;do&lt;BR /&gt; echo " String found : $line" &amp;gt;&amp;gt; output.txt&lt;BR /&gt;done&lt;BR /&gt;exit 0;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Bassoi</description>
      <pubDate>Wed, 08 May 2002 20:32:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719962#M62840</guid>
      <dc:creator>Ricardo Bassoi</dc:creator>
      <dc:date>2002-05-08T20:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: KSH script - little help?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719963#M62841</link>
      <description>You could make this more efficient by doing the search on the front-end:&lt;BR /&gt;&lt;BR /&gt;grep "target string" myfile | while read X&lt;BR /&gt;  do&lt;BR /&gt;     echo "X=\${X}\""&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;This would return only the lines that contain the target string.&lt;BR /&gt;</description>
      <pubDate>Wed, 08 May 2002 20:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719963#M62841</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-05-08T20:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: KSH script - little help?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719964#M62842</link>
      <description>I frequently use awk to avoid that problem, since awk reads entire lines by default.  Sound like the readline thing works well though.&lt;BR /&gt;</description>
      <pubDate>Fri, 10 May 2002 12:39:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-script-little-help/m-p/2719964#M62842</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2002-05-10T12:39:06Z</dc:date>
    </item>
  </channel>
</rss>

