Operating System - HP-UX
1752545 Members
4797 Online
108788 Solutions
New Discussion юеВ

Help Help!! How to remote execute a command at HPUX v1

 
SOLVED
Go to solution
bennyyeung
Occasional Advisor

Help Help!! How to remote execute a command at HPUX v1

Hi,

Please share how to remote execute a command at HPUXv1. The orginal HPUX v1 is running a application A, which can execute by script level. As I knew it would enclosed very long dynamic paramters (around ten lines) with a single command to run.
By today configuration, i needed to remote run this long long command, it will caused the execution fail. Then I found it should be limitation on remote shell...I used "rsh" and "remsh".
Any one can let me know how to bypass the long dynamic parameter during our remote execution?????

Thanks!
Benny

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > languages. - Hp Forum Moderator

8 REPLIES 8
johnsonpk
Honored Contributor

Re: Help Help!! How to remote execute a command at HPUX v1

Hi Benny,

1)You may first try to create a temporary script/file that contains your command and all your dynamic variables/parameters on the remote machine

2) give execute permission for that file from remote machine

3) call the script from remote machine


regards!
johnson

johnsonpk
Honored Contributor
Solution

Re: Help Help!! How to remote execute a command at HPUX v1

Just to make things clear..

server A have application installed

you are calling that application from server B

1)from serverB

ServerB# remsh serverA -n "echo \"echo \"this is for testing on the remote server\" \" > /tmp/remotetesting"

2)give execute permission for the temporary script
serverB# remsh serverA -n "chmod 755 /tmp/remotetesting"

3) call the script from server B

serverb#remsh serverB -n "/tmp/remotetesting"



and the out put for the last command is like below..
this is for testing on the remote server


hope its clear to u

rgds
Johnson
Dennis Handly
Acclaimed Contributor

Re: How to remote execute a command on HP-UX 11.11

By using continuation lines, you should be able to have > 1 million bytes for a command line. I'm assuming that remsh will have the same limitation.

If you are using command line editing, the limit is much much smaller, 128 or 256 bytes.

>the long dynamic parameter

This is one ~800 byte long parm?

bennyyeung
Occasional Advisor

Re: Help Help!! How to remote execute a command at HPUX v1

Hi all,

Thanks your advice on the remote!

Actually, I can remote execute the script at Server B. But I found the remote excution cannot recongize my long long dynamic parameter from Server B to Server A. Please kindy advice the best practice of my case.

Can I export the dynamic parameter to a text file first and do the remote copy to server A. Then use remote excution this script again??

OR... can I extend the commend lenght limitation on remote shell ??

Friend.... any suggestion???

Benny
OldSchool
Honored Contributor

Re: Help Help!! How to remote execute a command at HPUX v1

did your "long dynamic parameter" contain spaces / blanks?

it would be helpful if you showed the command you actually entered, rather than trying to describe it
bennyyeung
Occasional Advisor

Re: Help Help!! How to remote execute a command at HPUX v1

Hi all,

I have resolve the remote execution issue, but I got a new problem. on the scripting. Anyone can help me!!!!

Why my script cannot recongize "\" this character?????

my input data is window application (eg. c:\testing\abc). When I used my script to echo this data, it will show "c: esting bc". Please let me know HOW to output as original??????

Thnaks!

Benny
Steven Schweda
Honored Contributor

Re: Help Help!! How to remote execute a command at HPUX v1

tuxito
New Member

Re: Help Help!! How to remote execute a command at HPUX v1

try to escape it.. puting double backslahs "\\" insted only one "\"

eg. c:\\testing\\abc