Environment, for remote script

Dirk Moolman DirkM
Tue Jun 19 00:49:13 PDT 2007


Sorry, my fault.   I thought it was not picking up the correct variable,
but the person that set up the remote env file (setenv.sh), made a typo
in one of his variables, and used a lower case letter in one of the
PATHs, instead of uppercase.

Interesting thing is, on the local server (the client), the path uses a
lowercase letter in this case, and on the remote server the same path
was set up using uppercase - took me a while to figure this out.

This is what happens when you don't stick to naming conventions .....

:-o


-----Original Message-----
From: linux-users-bounces at linux-sxs.org
[mailto:linux-users-bounces at linux-sxs.org] On Behalf Of Dirk Moolman
Sent: 19 June 2007 09:31 AM
To: Linux tips and tricks
Subject: Environment, for remote script

I have some trouble executing a remote script.   I am trying to run the
sample script at the bottom.

I log in on the client as root.  I then run the command
ssh -l oracle remoteserver /somedir/remote.sh


The script basically just sets some variables, and then executes a
simple database command.   The problem is: the client does not pick up
the environment variables that the remote script sets, but still has all
its old (local) environment variable.  (I placed some echo commands just
after the setenv.sh line to confirm this.


#----------------------------------
#Script name remote.sh
#----------------------------------
. /somedir/setenv.sh

sqlplus '/as sysdba'<<!
select *
from dual;
quit;
!
#-----------------------------------


Any help would be appreciated
Dirk


*** Disclaimer ***

The information contained in this e-mail is confidential and legally
privileged and is intended solely for the addressee and to others who
have the authority to receive it. Access to this e-mail by anyone else
is unauthorized and as such, any disclosure, copying, distribution or
any action taken or omitted in reliance on it is unlawful. If you have
received this e-mail in error, please notify the sender immediately.

The views expressed in this e-mail are the views of the individual
sender and should in no way be construed as the views of the Company.

The Company is not liable to ensure that outgoing e-mails are
virus-free.

The Company is not liable, should information or data, for whatever
reason, be corrupted or fail to reach its intended addressee.

The Company is not liable for any loss or damage of whatsoever nature
and howsoever arising resulting from the opening or the use of the
information in this e-mail, including its attachments and links.

The sender of this e-mail is subject to and bound by the terms and
conditions of Company's Electronic Communications Usage Policy.


*** Disclaimer ***

The information contained in this e-mail is confidential and legally privileged and is intended solely for the addressee and to others who have the authority to receive it. Access to this e-mail by anyone else is unauthorized and as such, any disclosure, copying, distribution or any action taken or omitted in reliance on it is unlawful. If you have received this e-mail in error, please notify the sender immediately.

The views expressed in this e-mail are the views of the individual sender and should in no way be construed as the views of the Company.

The Company is not liable to ensure that outgoing e-mails are virus-free.

The Company is not liable, should information or data, for whatever reason, be corrupted or fail to reach its intended addressee.

The Company is not liable for any loss or damage of whatsoever nature and howsoever arising resulting from the opening or the use of the information in this e-mail, including its attachments and links.

The sender of this e-mail is subject to and bound by the terms and conditions of Company+IBk-s Electronic Communications Usage Policy.



More information about the Linux-users mailing list