Quick: Unix shell scripts, which sets environment vars

Brett Greiner brett@kinetix.co.nz
Fri, 22 Aug 2003 09:09:35 +1200


Hi Ole,

We are running PH 8.13.D2 on an RS/6000 box running Aix 4.3.

What we did here is to execute a script, then that script calls the script
that you want to setup the env. variable.
i.e.
RUN COMMAND "<caller_scriptname>"

which calls your proper script;

caller_scriptname
. <scriptname>

and sets up the env. var.


>From memory we had this working, then tried it again a few weeks later, then
it stopped working. We then write the contents of the env. variable out to a
flat file, then used a designer file in quick to read the file.

Hope this helps.

Brett Greiner,
Software Developer,
Kinetix Group Ltd.,
New Plymouth,
New Zealand
ph. +64 6 759 1929
fx.  +64 6 759 1928

Email:   brett@kinetix.co.nz
Websites: www.kinetix.co.nz




-----Original Message-----
From: powerh-l-admin@cube.swau.edu
[mailto:powerh-l-admin@cube.swau.edu]On Behalf Of Ole Hansen,
ScanConsult
Sent: Thursday, 21 August 2003 10:10 p.m.
To: powerh-l@lists.swau.edu
Subject: Quick: Unix shell scripts, which sets environment vars


Hi all,

I need to execute a shell script from Quick, and retrieve the environment
variables, set by the script.

The script works and the variables is set in the calling process when run
manually from the shell with a dot preceeding the scriptname (.
<scriptname>) but when I try from Quick using RUN COMMAND ". <scriptname>"
it fails with an exit status of 126.

It is the leading dot, that causes the error because when I try RUN COMMAND
"<scriptname>", I get no errors - but the environment variables set by the
script are of course not available to GETSYSTEMVAL afterwards.

So I guess that my problem can be re-phrased to: How does one execute a
shell command from Quick using the same shell instance as Quick runs in?

Any help will be highly appreciated.

Mange hilsner / With kind regards

Ole Hansen

===========================================================
E-mail: oh@scanconsult.dk         Cell Phone: +45 4040 1150
===========================================================
ScanConsult IT-Partners ApS         Voice   : +45 8738 7474
Jegstrupvej 96A                     Fax     : +45 8738 7475
DK-8361 Hasselager         Support : support@scanconsult.dk
Denmark                    Sales   :   sales@scanconsult.dk
                 http://www.scanconsult.dk
= ParaSuite :  A Suite of Air Cargo Handling solutions    =
= ParaSafe  :  A Suite of IT-Security solutions           =
= Partners  : Hewlett-Packard, Cognos, Microsoft and more =


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003