<?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 Execute command in AWK and integrate with POSIX shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958293#M720236</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to perform a backup automatically when the log files are full in informix. &lt;BR /&gt;&lt;BR /&gt;Have though of an endless loop as follows:&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;onstat -l | grep "U--" | awk '{if (NR==[number of table] [execute backup]}'. &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;The [execute backup] is a script using ontape command which already available. &lt;BR /&gt;&lt;BR /&gt;Appreciate any advice on how to call the backup script within AWK or a better way to do it. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;YC</description>
    <pubDate>Thu, 24 Apr 2003 07:32:58 GMT</pubDate>
    <dc:creator>yc_2</dc:creator>
    <dc:date>2003-04-24T07:32:58Z</dc:date>
    <item>
      <title>Execute command in AWK and integrate with POSIX shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958293#M720236</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to perform a backup automatically when the log files are full in informix. &lt;BR /&gt;&lt;BR /&gt;Have though of an endless loop as follows:&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;onstat -l | grep "U--" | awk '{if (NR==[number of table] [execute backup]}'. &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;The [execute backup] is a script using ontape command which already available. &lt;BR /&gt;&lt;BR /&gt;Appreciate any advice on how to call the backup script within AWK or a better way to do it. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;YC</description>
      <pubDate>Thu, 24 Apr 2003 07:32:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958293#M720236</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2003-04-24T07:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Execute command in AWK and integrate with POSIX shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958294#M720237</link>
      <description>We need a little sample of data.&lt;BR /&gt;&lt;BR /&gt;The sintax for executing inside awl is system&lt;BR /&gt;&lt;BR /&gt;i.e. &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;onstat -l | grep "U--" | awk '{if (NR==[number of table])  commd="echo " $1 ; system(commd) }'. &lt;BR /&gt;sleep 300&lt;BR /&gt;done</description>
      <pubDate>Thu, 24 Apr 2003 07:59:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958294#M720237</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2003-04-24T07:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Execute command in AWK and integrate with POSIX shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958295#M720238</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Since you appear to be using 'awk' only to count the number of records, you could (simply) do:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;onstat -l | grep "U--" | [`wc -l` = $N] &amp;amp;&amp;amp; echo "ok"&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Apr 2003 09:31:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958295#M720238</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-04-24T09:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Execute command in AWK and integrate with POSIX shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958296#M720239</link>
      <description>Leong,&lt;BR /&gt;&lt;BR /&gt;  I don't know what's the reason caputring the Log file and then issuing ontape command.&lt;BR /&gt;&lt;BR /&gt;  If you just issue ontape -a command it will copy all full logical logs automatically.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Zafar</description>
      <pubDate>Thu, 24 Apr 2003 12:30:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/execute-command-in-awk-and-integrate-with-posix-shell/m-p/2958296#M720239</guid>
      <dc:creator>Zafar A. Mohammed_1</dc:creator>
      <dc:date>2003-04-24T12:30:29Z</dc:date>
    </item>
  </channel>
</rss>

