Environment, for remote script

Dirk Moolman DirkM
Tue Jun 19 00:31:03 PDT 2007


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+IBk-s Electronic Communications Usage Policy.



More information about the Linux-users mailing list