1847300 Members
2710 Online
110264 Solutions
New Discussion

Re: remsh problem

 
SOLVED
Go to solution
Amit Manna_6
Regular Advisor

remsh problem

I am running remsh command from one of the servers:

remsh remotehostname -l netman -n "./.profile;sho_ln machine_mode"

But it gives the following error:


ksh: show_ln: not found

Can anybody tell me the reason.


10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: remsh problem

the command show_In

is not on the search path of the remesh session.

You need to log onto the box via telnet, find the location of the program and make sure the PATH variable includes its home.

You might want to put it in the .profile

Your current command line may not load the .profile so that variable assignment is permanent.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Simon Hargrave
Honored Contributor

Re: remsh problem

I note that you don't assign points to your answers so you may wish to rectify that to get more answers.

But I think you want your line to read:

remsh remotehostname -l netman -n ". ./.profile;sho_ln machine_mode"

That will make sure the PATH for sho_ln (which is presumably in your .profile) is actually sourced into your shell.
Pete Randall
Outstanding Contributor

Re: remsh problem

Specify the full path name for the sho_ln command.


Pete

Pete
Pete Randall
Outstanding Contributor
Solution

Re: remsh problem

And ./.profile is doing nothing for you, it's being spawned in a separate subshell and will have no effect on subsequent commands. You would need to put a "dot space" in front of it.


Pete

Pete
Amit Manna_6
Regular Advisor

Re: remsh problem

When I am giving the full path I am geting the error:

app/produnm/xtelruntime/netman/dcl/sho_ln"
/usr/lib/dld.sl: Can't open shared library: /temp_scopes/V4111/localscope/exe/libshr.sl
/usr/lib/dld.sl: No such file or directory


Amit Manna_6
Regular Advisor

Re: remsh problem

This is not working

remsh remotehostname -l netman -n ". ./.profile;sho_ln machine_mode"
Rick Garland
Honored Contributor

Re: remsh problem

Get rid of the . ./.profile since you are already loggin in as a specific user.

remsh $HOST -l -n " . .profile 2>&-;sho_ln machine_mode"

Alzhy
Honored Contributor

Re: remsh problem

Rick Garland's syntax is correct.

Also, the man page of remsh is very clear on this and usage for each shell type.
Hakuna Matata.
Suraj Singh_1
Trusted Contributor

Re: remsh problem

Can you run sho_ln command with user netman on that machine?

If you can, then it is a PATH related problem. You can write a small script on that machine which exports PATH and then executes sho_ln command:
On "remotehost", login as netman:
# echo "export PATH=$PATH" > script
edit script and add sho_ln machine_mode at the end of this file.

Now from one of the servers, issue following command:
remsh remotehost -l netman '/path_to_script/script

This should work

Regards
What we cannot speak about we must pass over in silence.
Amit Manna_6
Regular Advisor

Re: remsh problem

HI All
Thanks for the answer.
Will the syntax very from shell to shell.
means will it be different for C Shell and K Shell and Bourne Shell.