1828479 Members
2877 Online
109978 Solutions
New Discussion

Re: remsh while-do loop

 
SOLVED
Go to solution
Mauro Scarlata
Frequent Advisor

remsh while-do loop

Hi all,

I'm trying to run the script in attachment: --> run_ResponseTime_Day.sh.

It has a remsh commands in a while loop.

The "while loop" doesn't read in the rigth way all lines in the config file: --> parametri_ResponseTime.cfg in attachment.

It reads only the first line and then it exits from loop.

In attachment you can find the output of the command: sh -x run_ResponseTime_Day.sh
--> run_ResponseTime_Day_output.txt

can you hepl me to undestand?

:-(

Thanks all!
Mauro
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: remsh while-do loop

Hi Mauro:

Add '-n' to your 'remsh' arguments. See the manpages for 'remsh(1)' for more details.

Regards!

..JRF...
Sandman!
Honored Contributor

Re: remsh while-do loop

JRF is absolutely correct. Add the "-n" switch to your remsh command and then the while loop won't exit because the stdin gets re-directed.

man remsh remshd(1M) for more info...

cheers!
Mauro Scarlata
Frequent Advisor

Re: remsh while-do loop

thanks JRF,

It all OK.

Mauro
Mauro Scarlata
Frequent Advisor

Re: remsh while-do loop

thanks All,

SOLUTION: add -n to remsh command!

:-)

Mauro