<?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 variables in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202430#M166906</link>
    <description>You simply &lt;BR /&gt;export TAREXIT&lt;BR /&gt;&lt;BR /&gt;But you should know that export works only in one direction: From Parent to Child process. Make sure that you are not trying to use a variable exported by a child process in a parent.&lt;BR /&gt;</description>
    <pubDate>Wed, 25 Feb 2004 16:04:00 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2004-02-25T16:04:00Z</dc:date>
    <item>
      <title>script variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202427#M166903</link>
      <description>I have a script that calls another script, which runs a cmd. I then take the exit variable and store it... &lt;BR /&gt;gzip -cxvf offline_backup.tar.bz2 -p --same-permissions -m --same-owner --overwrite&lt;BR /&gt;TAREXIT=${?}&lt;BR /&gt;&lt;BR /&gt;I have done testing when the gtar exit's succesfully and not successfully. &lt;BR /&gt;&lt;BR /&gt;How do I use TAREXIT in my original script?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried to do..&lt;BR /&gt;&lt;BR /&gt;gzip -cxvf offline_backup.tar.bz2 -p --same-permissions -m --same-owner --overwrite&lt;BR /&gt;TAREXIT=${?}&lt;BR /&gt;export $TAREXIT&lt;BR /&gt;&lt;BR /&gt;But I get an error...&lt;BR /&gt;/home/scripts/backup/uncompress_db.scr[45]: 2: is not an identifier&lt;BR /&gt;./test[175]: TAREXIT: Parameter not set.&lt;BR /&gt;&lt;BR /&gt;I am doing these scripts in ksh&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Feb 2004 15:54:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202427#M166903</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2004-02-25T15:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: script variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202428#M166904</link>
      <description>You can have the calling program take the output from the called program and assign it to a variable, which would require the called program to ECHO the TAREXIT variable.&lt;BR /&gt; &lt;BR /&gt;OR&lt;BR /&gt; &lt;BR /&gt;write the TAREXIT variable to a file in the format of:&lt;BR /&gt;export TAREXIT&lt;BR /&gt; &lt;BR /&gt;then have the calling program SOURCE (. ./thefilenameusedabove) thefilenamed usedabove.&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;if it's not necessary to have the called script external, then put it into the calling program.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 25 Feb 2004 16:02:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202428#M166904</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2004-02-25T16:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: script variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202429#M166905</link>
      <description>you use:&lt;BR /&gt;&lt;BR /&gt;TAREXIT=${?}&lt;BR /&gt;exit $TAREXIT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;in the call script&lt;BR /&gt;&lt;BR /&gt;cmd&lt;BR /&gt;retcode=${?}&lt;BR /&gt;#retcode will now equal the value of TAREXIT&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Feb 2004 16:03:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202429#M166905</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2004-02-25T16:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: script variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202430#M166906</link>
      <description>You simply &lt;BR /&gt;export TAREXIT&lt;BR /&gt;&lt;BR /&gt;But you should know that export works only in one direction: From Parent to Child process. Make sure that you are not trying to use a variable exported by a child process in a parent.&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Feb 2004 16:04:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-variables/m-p/3202430#M166906</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-02-25T16:04:00Z</dc:date>
    </item>
  </channel>
</rss>

