rsh with local variables


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers rsh with local variables
# 1  
Old 10-07-2002
rsh with local variables

Hi,

I am trying to do an rsh and execute the same script on a distant unix computer.
The problem is that I need to get all the local variables of the distant computer to launch correctly my script.

I'm working on AIX 4.3.3

I try to execute .profile in the rsh but it seems not to be enough.

Thanks for help.
# 2  
Old 10-07-2002
You could set the environment variables inside the script to insure that each time you run it, it will have the required information.

There would be no way to keep the environment variables the same on both servers unless you are using a NFS home directory AND your company has standards that provide that all servers must set up exactly the same.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Listing all local variables for unset

I have tried to thoroughly search other threads before posting this question... I have a shell script (bsh) that I'd like to "re-execute" if the user chooses to. Before the program is executed again the local variables (those set within the script) need to be unset. Is there a command that... (6 Replies)
Discussion started by: powwm
6 Replies

2. Shell Programming and Scripting

Using a find command in ssh but using local variables?

I have a script like this (Yes, I know the DAY6 number isn't right - I'm just testing at this point): DAY0=`date -I` DAY1=`date -I -d "1 day ago"` DAY6=`date -I -d "2 days ago"` if then ssh root@synology1 nohup rm -rf "/volume1/Fileserver/$DAY6" fi I've tested the line to remove the... (5 Replies)
Discussion started by: Orionizer
5 Replies

3. Programming

Thread function local variables

As I know threads share the memory. But, what about the local variables in the thread function? if i call multiple threads would they allocate seperate local variables for themselves? like thread_func() { int i, j; string... } Are the above local variables defined for each of... (1 Reply)
Discussion started by: saman_glorious
1 Replies

4. Solaris

Can i bind to a local login terminal running using rsh or remotely

Hi Can i ask? I had multiple solaris workstation running and some local users using it. Is it possible to bind to the local user terminal or console he's using as if like the user well type and I can see it and what my typing in the local user see it also. Is it possible.. Thanks. (3 Replies)
Discussion started by: jao_madn
3 Replies

5. Shell Programming and Scripting

Passing shell variables to a rsh command

I noticed my script is not passing the value of variable alert to the rsh command. I need some assistance, please. This is a solaris environement. Thanks! :confused: #!/bin/sh echo -n "Alert number:" read alert rsh rhost_name 'egrep $alert /opt/var/log/*.logs' (2 Replies)
Discussion started by: lopus
2 Replies

6. Shell Programming and Scripting

rsh help - getting the output of remote script to local server.

Hi, I have a script that runs for an hour. Have to run it on remote server and need the output it produces on the remote server to decide for failure or success. I run it through a Autosys Job which logs the outputs, both 1 & 2. I use the commands 1) rsh <SERVER> 'nohup /tmp/xyz.ksh &' 2)... (5 Replies)
Discussion started by: aster007
5 Replies

7. Shell Programming and Scripting

'while' loop does not change local variables?!

(I think this question desearves separate thread..) I have a problem with 'while' I am trying to set variables by 'while' and it is fine inside, but after completting the loop all changes are lost: > bb="kkkk - 111\nlllll - 22222\nbbbb - 4444" > echo "$bb" kkkk - 111 lllll - 22222 bbbb -... (3 Replies)
Discussion started by: alex_5161
3 Replies

8. Shell Programming and Scripting

How to make variables in script function local?

Is it possible to make function variables local? I mean for example, I have a script variable 'name' and in function I have declared variable 'name' I need to have script's 'name' have the same value as it was before calling the function with the same declaration. The way to preserve a... (5 Replies)
Discussion started by: alex_5161
5 Replies

9. Shell Programming and Scripting

Problem with global and local variables

Guys, how can I define global variables in sorlaris...cause I lose the values outside the scope. Rite now wat I do is,I redirect variable value to a file n then get it back outside the function...:o....theres obviously a better way of doing this...I now this is a basic question....but please... (2 Replies)
Discussion started by: qzv2jm
2 Replies

10. AIX

Environment variables in 'rsh'

HI, From a Windows XP machine I am doing an 'rsh' to a AIX system,I have updated .rhosts of AIX system with the remote system name and I could able to do a remote shell,but when i do the 'rsh' i am not getting the environment variables which is already set for the user in th AIX system in my rsh... (2 Replies)
Discussion started by: cherryven
2 Replies
Login or Register to Ask a Question