The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how do I make my workstation an installation server for a remote server?. calsum SUN Solaris 3 04-18-2008 12:54 PM
Transfer file from local unix server to remote server indira Shell Programming and Scripting 2 05-03-2007 03:35 AM
Transfer file from local unix server to remote server indira HP-UX 2 05-02-2007 02:15 PM
FTP multiple files from remote server to local server berlin_germany Shell Programming and Scripting 2 12-20-2006 12:24 AM
Finding an x25 address for a server peter.herlihy IP Networking 1 11-30-2001 07:18 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-13-2008
Registered User
 

Join Date: Aug 2008
Location: Bangalore , INDIA
Posts: 8
Post rsh not finding .profie in the remote server; please help

while using the rsh command to execute script S1 in the remote server it is not using the .profile in remote server.
The script S1 which is using sqlplus is not able to set up the ORACLE environment which is defined in .profile

Thanks in advance....
Reply With Quote
Forum Sponsor
  #2  
Old 08-13-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 1,031
Put into the beginning of your script a sourcing of the profile following, then try it again:
Code:
 . ./.profile
Reply With Quote
  #3  
Old 08-13-2008
Registered User
 

Join Date: Aug 2008
Location: Bangalore , INDIA
Posts: 8
Thanks for your reply; But its not working.
also after running the rsh command it was showing $PATH of source server rather thn Destination(Remote) Server so i hard coded that above the script in the remote.

But i can't hard code the .profile ...please suggest.
Reply With Quote
  #4  
Old 08-14-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 1,031
"it's not working" is not a precise description of your error.

I just tested it. I put an environment script with following in it on box B:
Code:
NEWVAR=something
export NEWVAR
The export is not necessarry for this test but as you are going to start additional stuff, it won't do any harm.

Also a script using this (sourcing):
Code:
. ./envfile
echo $NEWVAR
Invoking the second script via ssh works just fine, echoing me "something". Same has to work with rsh.
And if you can not modify script 2, you'll have just to write the sourcing infront of the script 2 name like:

Code:
ssh somebox01 ". ./envfile; myscript".
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0