Hello,
On HP-UX shell (sh ou ksh), it seems there is a bug in the while loop.
Try :
echo 'serv1
serv2' | while read N
do
echo $N
done
It works fine and prints:
serv1
serv2
Then try :
echo 'serv1
serv2' | while read N
do
echo $N
remsh $N "ls /etc/passwd"
done
It prints only :
serv1
/etc/passwd
Where is serv2 ???
In fact it exits from the while loop after the first line !
Why ? I do not remember the same problem on Aix ...
HP-UX version B.11.11 but I noticed it on another version.
JP
On HP-UX shell (sh ou ksh), it seems there is a bug in the while loop.
Try :
echo 'serv1
serv2' | while read N
do
echo $N
done
It works fine and prints:
serv1
serv2
Then try :
echo 'serv1
serv2' | while read N
do
echo $N
remsh $N "ls /etc/passwd"
done
It prints only :
serv1
/etc/passwd
Where is serv2 ???
In fact it exits from the while loop after the first line !
Why ? I do not remember the same problem on Aix ...
HP-UX version B.11.11 but I noticed it on another version.
JP