<?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 expect script syntax problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2987999#M123778</link>
    <description>can someone help me find the correct syntax to the following?  i'm trying to loop through the output of awk command.&lt;BR /&gt;&lt;BR /&gt;foreach line [ awk '$4 == 103 &amp;amp;&amp;amp; $9 !="*.rec" { print $9 }' incomingfiles.rec ].&lt;BR /&gt;&lt;BR /&gt;thanks in advance,&lt;BR /&gt;&lt;BR /&gt;chris</description>
    <pubDate>Tue, 03 Jun 2003 20:35:41 GMT</pubDate>
    <dc:creator>William Harris_3</dc:creator>
    <dc:date>2003-06-03T20:35:41Z</dc:date>
    <item>
      <title>expect script syntax problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2987999#M123778</link>
      <description>can someone help me find the correct syntax to the following?  i'm trying to loop through the output of awk command.&lt;BR /&gt;&lt;BR /&gt;foreach line [ awk '$4 == 103 &amp;amp;&amp;amp; $9 !="*.rec" { print $9 }' incomingfiles.rec ].&lt;BR /&gt;&lt;BR /&gt;thanks in advance,&lt;BR /&gt;&lt;BR /&gt;chris</description>
      <pubDate>Tue, 03 Jun 2003 20:35:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2987999#M123778</guid>
      <dc:creator>William Harris_3</dc:creator>
      <dc:date>2003-06-03T20:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: expect script syntax problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988000#M123779</link>
      <description>What about ..&lt;BR /&gt;..&lt;BR /&gt;awk '$4==103 &amp;amp;&amp;amp; $9 !="*.rec" {print $9}' incomingfiles.rec | while read LINE&lt;BR /&gt;do&lt;BR /&gt;print $LINE&lt;BR /&gt;done&lt;BR /&gt;...</description>
      <pubDate>Tue, 03 Jun 2003 21:06:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988000#M123779</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-06-03T21:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: expect script syntax problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988001#M123780</link>
      <description>I'm sorry I did not read well.. you said "Expect script" .. ignore my post.</description>
      <pubDate>Tue, 03 Jun 2003 21:09:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988001#M123780</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-06-03T21:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: expect script syntax problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988002#M123781</link>
      <description>well it has been awhile and i don't have an expect installation for testing, but something like this should get you started.&lt;BR /&gt;&lt;BR /&gt;your probably going to have to play with the quoting for the awk statement.&lt;BR /&gt;&lt;BR /&gt;set input [open "| awk '$4 == 103 &amp;amp;&amp;amp; $9 != \"*.rec\" {print $9;}' infile.rec " ]&lt;BR /&gt;&lt;BR /&gt;while {[gets $input line] != -1} {&lt;BR /&gt;#do something with $line&lt;BR /&gt;puts "$line"&lt;BR /&gt;}&lt;BR /&gt;close $input</description>
      <pubDate>Tue, 03 Jun 2003 21:50:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988002#M123781</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-06-03T21:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: expect script syntax problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988003#M123782</link>
      <description>expect isn't really the problem here I would think... as suggested ... it's probably just your line or quoting...&lt;BR /&gt;&lt;BR /&gt;you could try it like this&lt;BR /&gt;cat file |&lt;BR /&gt;while read line&lt;BR /&gt;do&lt;BR /&gt;echo $line | awk '$4 == 103 &amp;amp;&amp;amp; $9 !="*.rec" { print $9 }' incomingfiles.rec&lt;BR /&gt;done</description>
      <pubDate>Wed, 04 Jun 2003 10:30:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/expect-script-syntax-problem/m-p/2988003#M123782</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-06-04T10:30:28Z</dc:date>
    </item>
  </channel>
</rss>

