<?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: Shell question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676748#M52249</link>
    <description>Hi Shabu,&lt;BR /&gt;&lt;BR /&gt;I think it is not possible to make changes after assigning points.&lt;BR /&gt;&lt;BR /&gt;Please remember, if you start a script like described by the others here:&lt;BR /&gt;&lt;BR /&gt;. scriptname&lt;BR /&gt;&lt;BR /&gt;you have to be sure, that your script is using the same syntax! This way, you can't use scripts which use diffenrent shells, like kornshell- scripts and in that script c-shell- scripts. This would cause errors. You can simply find out which shell interprets the script in most cases looking for a line like this:&lt;BR /&gt;&lt;BR /&gt;# !/usr/bin/ksh     --&amp;gt;&amp;gt; kornshell&lt;BR /&gt;# !/usr/bin/csh     --&amp;gt;&amp;gt; c- shell&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Mar 2002 07:25:37 GMT</pubDate>
    <dc:creator>Peter Kloetgen</dc:creator>
    <dc:date>2002-03-06T07:25:37Z</dc:date>
    <item>
      <title>Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676740#M52241</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;There is a script which executes different shell scripts within it, let's say I have a script which executes 3 different scripts, my question is how many shell does it spawn, if three, how can I make it not to spawn new shells and run the script in the same shell ..&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shabu</description>
      <pubDate>Tue, 05 Mar 2002 22:49:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676740#M52241</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-03-05T22:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676741#M52242</link>
      <description>If the scripts are written for the same shell, then you may simply source them.&lt;BR /&gt;&lt;BR /&gt;If sh or ksh, then `. script` or `. /path/to/script`.&lt;BR /&gt;&lt;BR /&gt;If csh, then `source script` or `source /path/to/script`.&lt;BR /&gt;&lt;BR /&gt;But if you want each of these to run concurrently, then they must run in there own shells.</description>
      <pubDate>Tue, 05 Mar 2002 22:56:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676741#M52242</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2002-03-05T22:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676742#M52243</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;In your case, each script is a new process but only the parent and one child is run at a time therefore you have at most two shells running at any one time.&lt;BR /&gt;&lt;BR /&gt;You have a couple of options:&lt;BR /&gt;&lt;BR /&gt;. myshell2.sh&lt;BR /&gt;&lt;BR /&gt;This will run .myshell.sh as simply a part of the parent shell BUT you must make certain that myshell2.sh does not use an exit statement or myshell2.sh AND the parent (since they are one and the same) will terminate.&lt;BR /&gt;&lt;BR /&gt;You could also use exec BUT this is not a good answer because exec replaces the current shell with another.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Mar 2002 22:57:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676742#M52243</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-03-05T22:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676743#M52244</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Further to this, if you are using pipes in your shell script, each pipe will spawn off a different process.&lt;BR /&gt;&lt;BR /&gt;eg. ps -fae|grep blah&lt;BR /&gt;&lt;BR /&gt;There will be two processes spawned.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Tue, 05 Mar 2002 22:58:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676743#M52244</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-03-05T22:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676744#M52245</link>
      <description>When you run another script in your "main script", another shell will be spawned. To avoid it, start the script with a "."&lt;BR /&gt;&lt;BR /&gt;. &amp;lt;script-name&amp;gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Mar 2002 23:01:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676744#M52245</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-03-05T23:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676745#M52246</link>
      <description>&lt;BR /&gt;Thanks for all your answers !&lt;BR /&gt;&lt;BR /&gt;So, in my case can I say that my script spawns three shells and if I want my script to not to do that then&lt;BR /&gt;&lt;BR /&gt;. scriptname will only run in the current shell (one shell) provided I don't have an exit statement ?&lt;BR /&gt;&lt;BR /&gt;Will my script perform better if I don't break up my script into different scripts and do everything in one single script ?&lt;BR /&gt;&lt;BR /&gt;Thanks for your assistance Guys !&lt;BR /&gt;&lt;BR /&gt;-Shabu&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Mar 2002 00:04:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676745#M52246</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-03-06T00:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676746#M52247</link>
      <description>That's almost an "it depends" question.  I don't think there's much difference in system overhead between running one shell or 4, even if you source them or not.&lt;BR /&gt;&lt;BR /&gt;If you create variables in the scripts you call and want to use them in the calling script, then you should source the called scripts.&lt;BR /&gt;&lt;BR /&gt;If the called scripts can "stand on their own" and would be useful to be stand-alone scripts, then that's what I'd do.&lt;BR /&gt;&lt;BR /&gt;If you can run the called scripts concurrently, you could start them in the background from the calling script.  You can use the "wait" command if you need all of them to finish before continuing in the calling script.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 06 Mar 2002 00:44:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676746#M52247</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-03-06T00:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676747#M52248</link>
      <description>Thanks Darrell !&lt;BR /&gt;&lt;BR /&gt;That's what I thought too, shouldn't be much of a overhead.&lt;BR /&gt;&lt;BR /&gt;Different question: How do I make changes to the "Assign Points" section ? Do you know ?&lt;BR /&gt;&lt;BR /&gt;-Shabu</description>
      <pubDate>Wed, 06 Mar 2002 00:58:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676747#M52248</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-03-06T00:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Shell question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676748#M52249</link>
      <description>Hi Shabu,&lt;BR /&gt;&lt;BR /&gt;I think it is not possible to make changes after assigning points.&lt;BR /&gt;&lt;BR /&gt;Please remember, if you start a script like described by the others here:&lt;BR /&gt;&lt;BR /&gt;. scriptname&lt;BR /&gt;&lt;BR /&gt;you have to be sure, that your script is using the same syntax! This way, you can't use scripts which use diffenrent shells, like kornshell- scripts and in that script c-shell- scripts. This would cause errors. You can simply find out which shell interprets the script in most cases looking for a line like this:&lt;BR /&gt;&lt;BR /&gt;# !/usr/bin/ksh     --&amp;gt;&amp;gt; kornshell&lt;BR /&gt;# !/usr/bin/csh     --&amp;gt;&amp;gt; c- shell&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Mar 2002 07:25:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-question/m-p/2676748#M52249</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-03-06T07:25:37Z</dc:date>
    </item>
  </channel>
</rss>

