<?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: run command concurrently within script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390929#M681630</link>
    <description>Thanks. I will try it out. The fsck is use for true copy purpose.</description>
    <pubDate>Tue, 31 Mar 2009 08:09:29 GMT</pubDate>
    <dc:creator>yc_2</dc:creator>
    <dc:date>2009-03-31T08:09:29Z</dc:date>
    <item>
      <title>run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390925#M681626</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is it possible to write a script to run multiple commands concurrently? Example: perform fsck for a few file systems. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Tue, 31 Mar 2009 06:31:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390925#M681626</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2009-03-31T06:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390926#M681627</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Yes&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;command1 &amp;amp;&lt;BR /&gt;command2 &amp;amp;&lt;BR /&gt;command3 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Doing this with fsck might cause I/O to go high, but it should work.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 31 Mar 2009 06:39:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390926#M681627</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-03-31T06:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390927#M681628</link>
      <description>Any way to capture the output since it is in back ground?</description>
      <pubDate>Tue, 31 Mar 2009 07:20:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390927#M681628</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2009-03-31T07:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390928#M681629</link>
      <description>Try&lt;BR /&gt;&lt;BR /&gt;# command1 &amp;gt;/tmp/command1.out 2&amp;gt;/tmp/command1.out &amp;amp;&lt;BR /&gt;&lt;BR /&gt;BTW, fsck on a newly created filesystem is maybe not needed and will return very quickly.</description>
      <pubDate>Tue, 31 Mar 2009 07:24:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390928#M681629</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2009-03-31T07:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390929#M681630</link>
      <description>Thanks. I will try it out. The fsck is use for true copy purpose.</description>
      <pubDate>Tue, 31 Mar 2009 08:09:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390929#M681630</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2009-03-31T08:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390930#M681631</link>
      <description>Why pipe 2 times to the same file?&lt;BR /&gt;&lt;BR /&gt;# command1 &amp;gt;/tmp/command1.out 2&amp;gt;/tmp/command1.out &amp;amp;&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Mar 2009 08:12:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390930#M681631</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2009-03-31T08:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390931#M681632</link>
      <description>One "&amp;gt;" was missing, sorry.&lt;BR /&gt;&lt;BR /&gt;# command1 &amp;gt;/tmp/command1.out 2&amp;gt;&amp;gt;/tmp/command1.out &amp;amp;&lt;BR /&gt;&lt;BR /&gt;But you can use different files, of course.</description>
      <pubDate>Tue, 31 Mar 2009 08:18:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390931#M681632</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2009-03-31T08:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: run command concurrently within script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390932#M681633</link>
      <description>&amp;gt; # command1 &amp;gt;/tmp/command1.out 2&amp;gt;&amp;gt;/tmp/command1.out &amp;amp;&lt;BR /&gt; &lt;BR /&gt;This is a better way if all output (stdout and stderr must go into the same file):&lt;BR /&gt; &lt;BR /&gt;cmd1 &amp;gt; /tmp/cmd1.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;cmd2 &amp;gt; /tmp/cmd2.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt; &lt;BR /&gt;The construct 2&amp;gt;&amp;amp;1 says: take stderr (file number 2) and redirect it into file number 1. Each time the command runs, it will clear the log file. To track all runs of the command, change &amp;gt; to &amp;gt;&amp;gt; as in:&lt;BR /&gt; &lt;BR /&gt;cmd1 &amp;gt;&amp;gt; /tmp/cmd1.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;cmd2 &amp;gt;&amp;gt; /tmp/cmd2.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt; &lt;BR /&gt;For cumulative logs, be sure to add a timestamp, especially one that can be easily sorted or selected such as YYYYMMDD.HHMMSS. You can add this to your scripts:&lt;BR /&gt; &lt;BR /&gt;echo "$(date +%Y%m%d.%H%M%S) and sime text..."&lt;BR /&gt; &lt;BR /&gt;Or for applications that you can't modify, add the timestamp before running the program:&lt;BR /&gt; &lt;BR /&gt;echo "$(date +%Y%m%d.%H%M%S)" &amp;gt;&amp;gt; cmd1.log; cmd1 &amp;gt;&amp;gt; /tmp/cmd1.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;echo "$(date +%Y%m%d.%H%M%S)" &amp;gt;&amp;gt; cmd1.log; cmd2 &amp;gt;&amp;gt; /tmp/cmd2.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Mar 2009 11:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-command-concurrently-within-script/m-p/4390932#M681633</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-03-31T11:01:18Z</dc:date>
    </item>
  </channel>
</rss>

