<?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: Unix date command in awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-date-command-in-awk/m-p/3078680#M142170</link>
    <description>You need to close your "date" pipe before using it again in the loop:  &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;     close("date")  &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Only one pipe open at a time.  You were getting the same date from the same pipe each time.  Does not work like shell script.</description>
    <pubDate>Thu, 25 Sep 2003 17:12:11 GMT</pubDate>
    <dc:creator>Scot Bean</dc:creator>
    <dc:date>2003-09-25T17:12:11Z</dc:date>
    <item>
      <title>Unix date command in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-date-command-in-awk/m-p/3078679#M142169</link>
      <description>I understand system commands can be executed and stored in a variable within awk.  Unfortunately, when using any date commands, the date value does not change.  Please see the example - any ideas why?&lt;BR /&gt;&lt;BR /&gt;onstat -g ses 30 -r 10 |\&lt;BR /&gt;  awk '/Current SQL/,/Last parsed/ {&lt;BR /&gt;    if ($1 == "Current") {&lt;BR /&gt;      "date" | getline d&lt;BR /&gt;      print d&lt;BR /&gt;    } else if ($1 != "Last") print $0&lt;BR /&gt;  }&lt;BR /&gt;'&lt;BR /&gt;Thu Sep 25 13:56:22 CDT 2003&lt;BR /&gt;  SELECT  *   FROM udfdef,udf   WHERE  udfdef.udtype= ?  AND udfname= ?&lt;BR /&gt;    AND udfdef.udfindex=udf.udfindex  AND udf.udtype= ?   AND udf.udjoin= ?&lt;BR /&gt;    AND udf.udsort=1&lt;BR /&gt;&lt;BR /&gt;Thu Sep 25 13:56:22 CDT 2003&lt;BR /&gt;  SELECT  *   FROM pfun    WHERE  pname= ?  AND pformat IS NULL&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Sep 2003 14:18:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-date-command-in-awk/m-p/3078679#M142169</guid>
      <dc:creator>Donald Dawson</dc:creator>
      <dc:date>2003-09-25T14:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unix date command in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-date-command-in-awk/m-p/3078680#M142170</link>
      <description>You need to close your "date" pipe before using it again in the loop:  &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;     close("date")  &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Only one pipe open at a time.  You were getting the same date from the same pipe each time.  Does not work like shell script.</description>
      <pubDate>Thu, 25 Sep 2003 17:12:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-date-command-in-awk/m-p/3078680#M142170</guid>
      <dc:creator>Scot Bean</dc:creator>
      <dc:date>2003-09-25T17:12:11Z</dc:date>
    </item>
  </channel>
</rss>

