The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing a script through GUI snvijaysankar UNIX for Dummies Questions & Answers 2 06-02-2008 01:49 AM
[AIX] executing script piooooter UNIX for Dummies Questions & Answers 1 05-25-2006 09:53 PM
executing script big123456 Shell Programming and Scripting 1 06-03-2005 04:32 AM
Executing ksh script from cgi hodges Shell Programming and Scripting 1 05-27-2003 07:57 AM
Executing Ps in script Claude Shell Programming and Scripting 1 11-21-2001 10:01 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2003
Registered User
 

Join Date: Aug 2003
Location: Ireland
Posts: 269
Unhappy RSH use for executing a script

I have a script on one server.. which I am trying to run remotely from another server using rsh....

The command that i use from my second server is as follows

rsh /user_name="ops" /password="ops1" server1 "cd /users/ops ; ./script1"


When I run this I receive an error containing the below errors:
grc_error() says: GRC file /users/ops/.ops.rc open failed: No such file or directory (result 3)

I can run the script with no problems on server1 but when I try remotely from another server using rsh I receive the error above.. Any help would be appreciated - Anyone know what this file is or needs to contain??
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-01-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,453
The syntax on your rsh command is very odd. What versions of unix are running on these systems?

If server1 works like versions of unix that I know, I may have an idea. Sign on to it and type env to see your environment. Then run an rsh command with just "env". I'll bet that your script needs an environment variable set. I would figure out which one and set it in the script.
Reply With Quote
  #3 (permalink)  
Old 10-01-2003
Registered User
 

Join Date: Aug 2003
Location: Ireland
Posts: 269
I am running the rsh command from an openvms system to a unix alpha system.

I hadnt checked the env variables yet but I will do so now...
Any idea what variable it could be?
Reply With Quote
  #4 (permalink)  
Old 10-01-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,453
No idea about which variable. Just clobber them one by one until it fails.

openvms supports rsh?! Now that is interesting....
Reply With Quote
  #5 (permalink)  
Old 10-01-2003
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Well, I posted that your DCL may in the wrong order, but then I jumped on a free VMS account and looked further - it should be fine.

Follow Perderabo's suggestion.

Last edited by RTM; 10-01-2003 at 10:45 AM.
Reply With Quote
  #6 (permalink)  
Old 10-01-2003
Registered User
 

Join Date: Aug 2003
Location: Ireland
Posts: 269
A lot of variables, so I am going through one by one.. I will let you know...



I am using openvms 7.3-1 and it supports rsh no problem... and I am pretty sure anything from at least 7.2 up does, not sure to prior to those versions.
Reply With Quote
  #7 (permalink)  
Old 10-02-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,453
Can the author of the script provide any guidance? There should be some documentation, even if it is only in comments inside the script.

This page seems to suggest that a perl module named named getrc might need RC_PATH. Could that be it?

And understand that once you get past this error, you could encounter another error generated by a missing environment variable. You can eventually find them all by trial and error. But someone who understands the tools being used by the script can probably find them all in a few seconds.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:24 PM.


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 Global Fact Book

Content Relevant URLs by vBSEO 3.2.0