rsh command - ksh

Hello,

I am trying to run a remote file (y.ksh) using rsh.
In this action i want to use an environment variable TOOL=/home/macc1

i am running the rsh from profile macc on server1.

rsh server2 -l macc1 "$TOOL/y.ksh"

but i can see that the executable command = /home/macc/y.ksh and not /home/macc1/y.ksh

How can I use environment variablein rsh???

HELP!!:confused:

do you have an account on server2 ? is it macc or macc1 ?
maybe your home directory it different from one server to another
can you just

rsh server2
pwd
id

(this will defaultly log in with your local user name (the one you are logged on server1 : macc)
or

rsh server2 -l macc1
pwd
id

do one of those work ? which ?

Maybe you should load your environment from within the script you want to run.

1 Like