Any help appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
this is expected. environment variables get inherited from parent
to child.
> Any help appreciated.
instead of starting a new sh to execute your shell command file,
execute it with the current shell.
eg.
. cmd.sh
instead of
cmd.sh
note that the #!/bin/sh will be treated as a comment with .
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
Mike Taillon Quitters never win, Winners never quit.
QNX Software Systems, Ltd. But those who neither win nor quit are idiots.
export QRTS=/usr/qrts
in /etc/profile, then all users will see this $QRTS env variable.
Remember you need to log completely out (not just quit a shell) when you
modify /etc/profile because it only executes when you log in.
Hope this helps,
Nick
g_dalby wrote:
> How can I make variable definitions global in QNX4 other than during
> login via the profile and .profile files. I have several projects and
> would like to redefine variables such as HOME without logging in as a
> different user. I can simply execute: export HOME=/xxx within a shell
> command file but the definition is lost once the file completes.
>
> Any help appreciated.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
****************************************************
Quality Real-Time Systems
Tel: 864 656 7708 / Fax: 864 624 9155
http://www.qrts.com
...or you can set the ENV variable in sysinit to point to the profile.
Put "export ENV=/etc/profile" before you run tinit.
Then everytime a new shell is opened profile will be read.
. my_new_environment_variables.sh
This will evaluate the statements in the file in the context of your
current shell, so will have lasting effect.
Sam
Previously, Nick Costescu wrote in comp.os.qnx:
> Graham,
> The appropriate place to do this in /etc/profile. For example, if you put
>
> export QRTS=/usr/qrts
> in /etc/profile, then all users will see this $QRTS env variable.
>
> Remember you need to log completely out (not just quit a shell) when you
> modify /etc/profile because it only executes when you log in.
>
> Hope this helps,
> Nick
>
>
> g_dalby wrote:
>
> > How can I make variable definitions global in QNX4 other than during
> > login via the profile and .profile files. I have several projects and
> > would like to redefine variables such as HOME without logging in as a
> > different user. I can simply execute: export HOME=/xxx within a shell
> > command file but the definition is lost once the file completes.
> >
> > Any help appreciated.
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> --
>
> ****************************************************
> Quality Real-Time Systems
> Tel: 864 656 7708 / Fax: 864 624 9155
> http://www.qrts.com
>
>
>
--
--
Sam Roberts (s...@cogent.ca), Cogent Real-Time Systems (www.cogent.ca)
"News is very popular among its readers." - RFC 977 (NNTP)