<?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: Script Performance in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042943#M433199</link>
    <description>Hi Fernando&lt;BR /&gt;&lt;BR /&gt;here it is&lt;BR /&gt;&lt;BR /&gt;# DATA=`date|awk '{print $2,$3,$6}'`.&lt;BR /&gt;# TEST=`sar -uM 1 1 | tail -1`&lt;BR /&gt;# echo $DATA $TEST &amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;&lt;BR /&gt;# more /tmp/perf_cpu.txt&lt;BR /&gt;Apr 27, PM. system 0 0 0 100&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Aussan</description>
    <pubDate>Fri, 27 Apr 2007 11:44:32 GMT</pubDate>
    <dc:creator>Aussan</dc:creator>
    <dc:date>2007-04-27T11:44:32Z</dc:date>
    <item>
      <title>Script Performance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042942#M433198</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i would like the output of my script in the same line, example:&lt;BR /&gt;&lt;BR /&gt;Apr 27 2007  system      17       3       2      78&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DATA=`date|awk '{print $2,$3,$6}'`&lt;BR /&gt;echo $DATA &amp;gt;&amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;sar -uM 1 1 | tail -1 &amp;gt;&amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Apr 2007 11:19:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042942#M433198</guid>
      <dc:creator>Fernando Jose P de Souz</dc:creator>
      <dc:date>2007-04-27T11:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script Performance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042943#M433199</link>
      <description>Hi Fernando&lt;BR /&gt;&lt;BR /&gt;here it is&lt;BR /&gt;&lt;BR /&gt;# DATA=`date|awk '{print $2,$3,$6}'`.&lt;BR /&gt;# TEST=`sar -uM 1 1 | tail -1`&lt;BR /&gt;# echo $DATA $TEST &amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;&lt;BR /&gt;# more /tmp/perf_cpu.txt&lt;BR /&gt;Apr 27, PM. system 0 0 0 100&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Aussan</description>
      <pubDate>Fri, 27 Apr 2007 11:44:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042943#M433199</guid>
      <dc:creator>Aussan</dc:creator>
      <dc:date>2007-04-27T11:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script Performance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042944#M433200</link>
      <description>Hi Fernando&lt;BR /&gt;&lt;BR /&gt;here it is&lt;BR /&gt;&lt;BR /&gt;# DATA=`date|awk '{print $2,$3,$4}'`.&lt;BR /&gt;# TEST=`sar -uM 1 1 | tail -1`&lt;BR /&gt;# echo $DATA $TEST &amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;&lt;BR /&gt;# more /tmp/perf_cpu.txt&lt;BR /&gt;Apr 27, 2007 system 0 0 0 100&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Aussan</description>
      <pubDate>Fri, 27 Apr 2007 11:45:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042944#M433200</guid>
      <dc:creator>Aussan</dc:creator>
      <dc:date>2007-04-27T11:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script Performance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042945#M433201</link>
      <description>Thanks.</description>
      <pubDate>Fri, 27 Apr 2007 12:00:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042945#M433201</guid>
      <dc:creator>Fernando Jose P de Souz</dc:creator>
      <dc:date>2007-04-27T12:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script Performance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042946#M433202</link>
      <description>All you really need to do is change this line:&lt;BR /&gt;echo $DATA &amp;gt;&amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;to this:&lt;BR /&gt;echo "${DATA} \c" &amp;gt;&amp;gt; /tmp/perf_cpu.txt&lt;BR /&gt;&lt;BR /&gt;However, you really don't need awk to format the date output:&lt;BR /&gt;so I would change:&lt;BR /&gt;DATA=`date|awk '{print $2,$3,$6}'`&lt;BR /&gt;to :&lt;BR /&gt;DATA=$(date '+%b %d %Y')&lt;BR /&gt;&lt;BR /&gt;so that a better version of your script should be very close to this:&lt;BR /&gt;&lt;BR /&gt;---------------------------------&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;OFILE=/tmp/perf_cpu.txt&lt;BR /&gt;DATA=$(date '+%b %d %Y')&lt;BR /&gt;echo "${DATA} \c" &amp;gt;&amp;gt; ${OFILE}&lt;BR /&gt;sar -uM 1 1 | tail -1 &amp;gt;&amp;gt; ${OFILE}&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Apr 2007 12:06:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-performance/m-p/5042946#M433202</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-04-27T12:06:41Z</dc:date>
    </item>
  </channel>
</rss>

