<?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 Simultaneuse variable definition confict .. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210066#M168356</link>
    <description>Greetings !&lt;BR /&gt;I have 2 mirror scripts, that run exactly at same time set thru cron.&lt;BR /&gt;shell #1 has:&lt;BR /&gt;PROC=billmag01&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;shell #2 has:&lt;BR /&gt;PROC=bilmal77&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;eventually second script definition overides the first one (as their name are SAME=PROC), though I thought that those Vars will be accessible only inside their scripts.&lt;BR /&gt;I'm not doing iny special in my shells regarding Vars definition (exprot,etc...).&lt;BR /&gt;&lt;BR /&gt;Is there any way to isolate those vars inside shells. Or probaly I can add any dinamic extensions to their names:&lt;BR /&gt;PROC.&amp;amp;&amp;amp;=billmag01  ....etc..&lt;BR /&gt;&lt;BR /&gt;Will apprec any pro opinions, I have 25 of those shells, so thinking how to make it most reliable and fast.&lt;BR /&gt;&lt;BR /&gt;Thank&lt;BR /&gt;Dai&lt;BR /&gt;</description>
    <pubDate>Thu, 04 Mar 2004 18:10:49 GMT</pubDate>
    <dc:creator>Vlad_11</dc:creator>
    <dc:date>2004-03-04T18:10:49Z</dc:date>
    <item>
      <title>Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210066#M168356</link>
      <description>Greetings !&lt;BR /&gt;I have 2 mirror scripts, that run exactly at same time set thru cron.&lt;BR /&gt;shell #1 has:&lt;BR /&gt;PROC=billmag01&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;shell #2 has:&lt;BR /&gt;PROC=bilmal77&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;eventually second script definition overides the first one (as their name are SAME=PROC), though I thought that those Vars will be accessible only inside their scripts.&lt;BR /&gt;I'm not doing iny special in my shells regarding Vars definition (exprot,etc...).&lt;BR /&gt;&lt;BR /&gt;Is there any way to isolate those vars inside shells. Or probaly I can add any dinamic extensions to their names:&lt;BR /&gt;PROC.&amp;amp;&amp;amp;=billmag01  ....etc..&lt;BR /&gt;&lt;BR /&gt;Will apprec any pro opinions, I have 25 of those shells, so thinking how to make it most reliable and fast.&lt;BR /&gt;&lt;BR /&gt;Thank&lt;BR /&gt;Dai&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2004 18:10:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210066#M168356</guid>
      <dc:creator>Vlad_11</dc:creator>
      <dc:date>2004-03-04T18:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210067#M168357</link>
      <description>Just clarification:&lt;BR /&gt; shell #1 has:&lt;BR /&gt;PROC=billmag01&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt; shell #2 has:&lt;BR /&gt;PROC=bilmal77&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;During execution shell #1 set PROC to bilma177 (that is from shell #2).&lt;BR /&gt;&lt;BR /&gt;Tx&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2004 18:13:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210067#M168357</guid>
      <dc:creator>Vlad_11</dc:creator>
      <dc:date>2004-03-04T18:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210068#M168358</link>
      <description>The variable definitions are isolated in the scripts. For example if one has a=1 and the other has a=2 each script will have a different value of a.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dave.</description>
      <pubDate>Thu, 04 Mar 2004 18:18:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210068#M168358</guid>
      <dc:creator>David Burgess</dc:creator>
      <dc:date>2004-03-04T18:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210069#M168359</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if those scripts do not interact, it does not matter how often you use PROC, it is separated. More likely you have an unwanted assigment to PROC or a call . shell2&lt;BR /&gt;&lt;BR /&gt;no need for PROC.&amp;amp;&amp;amp;&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2004 18:27:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210069#M168359</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2004-03-04T18:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210070#M168360</link>
      <description>Unless these two scripts are related as parent and child then the two have absolutely nothing to do with each other. They could, of course, inherit exported variabes from a common process but even in that case the two child processes cannot interact in the way you describe.&lt;BR /&gt;&lt;BR /&gt;It is considered good form these days to use the typeset command everywhere.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;myfunc()&lt;BR /&gt;{&lt;BR /&gt;  typeset -i10 MYVAR=10&lt;BR /&gt;  ((MYVAR += 1))&lt;BR /&gt;  echo "MYVAR inside myfunc = ${MYVAR}"&lt;BR /&gt;  return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;typeset -i10 MYVAR=100&lt;BR /&gt;echo "MYVAR = ${MYVAR}"&lt;BR /&gt;myfunc&lt;BR /&gt;echo "MYVAR = ${MYVAR}"&lt;BR /&gt;&lt;BR /&gt;This example uses the same variable within &lt;BR /&gt;the same script. The typeset command used within a function causes the local copy to take precedence. The -i10 declares the variable to be a base-10 integer.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A typeset -x MYVAR command causes MYVAR to be automatically exported to child processes.&lt;BR /&gt;Man sh-posix for details.&lt;BR /&gt;&lt;BR /&gt;One other way that two scripts can APPEAR to share data is the use of the "." command.&lt;BR /&gt;&lt;BR /&gt;Inside shell1.sh if you add this statement:&lt;BR /&gt;. ./shell2.sh &lt;BR /&gt;then everything in shell2.sh becomes part of shell1.sh. It is NOT a child process, in that case.&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2004 18:30:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210070#M168360</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-04T18:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210071#M168361</link>
      <description>Thanks, everyone !&lt;BR /&gt;Yes, theory is all right!&lt;BR /&gt;Probably I will expand my case, how it happened.&lt;BR /&gt;1.Each of shells send email, given value of PROC=bill is going to subject line, like:&lt;BR /&gt;elm -s " $PROC"  -a $MAILTO &amp;lt; temp2 &amp;gt;&amp;gt; $LOGFIL&lt;BR /&gt;&lt;BR /&gt;2. shell#1, shell#2 reside in same directory, but there is no any kind of interaction between them, neither misspelling in PROC=... definition. &lt;BR /&gt;&lt;BR /&gt;3. I have mail sent by shell#1 (judge by logfile, email body and attachments) with subject from shell#2.&lt;BR /&gt;&lt;BR /&gt;I realize that me is the main suspect in this case, but I checked multiple times all spelling in both shells.&lt;BR /&gt;Maybe ELM that uses SENDMAIL on background treats those variable somehow else then in shell or ....????&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Dai &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2004 18:52:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210071#M168361</guid>
      <dc:creator>Vlad_11</dc:creator>
      <dc:date>2004-03-04T18:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210072#M168362</link>
      <description>+ more info:&lt;BR /&gt;both shells scheduled to run in cron:&lt;BR /&gt;00 21 2-5 * *  /appl/shell1 &lt;BR /&gt;00 21 3-6 * *  /appl/shell2</description>
      <pubDate>Thu, 04 Mar 2004 18:58:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210072#M168362</guid>
      <dc:creator>Vlad_11</dc:creator>
      <dc:date>2004-03-04T18:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneuse variable definition confict ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210073#M168363</link>
      <description>When you use elm the mail transport agent is sendmail.&lt;BR /&gt;&lt;BR /&gt;I agree with the conclusions above.&lt;BR /&gt;&lt;BR /&gt;Just thought I'd confirm your thoughs on sendmail and elm.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 04 Mar 2004 19:01:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simultaneuse-variable-definition-confict/m-p/3210073#M168363</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-03-04T19:01:37Z</dc:date>
    </item>
  </channel>
</rss>

