This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: ssh breaks while loop
- From: "Kenneth Nellis" <knellis at syntek-usa dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 14 Aug 2006 09:54:21 -0400
- Subject: RE: ssh breaks while loop
FWIW, I see the same behavior, but not just Cygwin, but also on
a Red Hat Linux installation, so I guess it's more of a bash/ssh
issue than one with Cygwin. A workaround that works for me is the
following:
for host in $(<hostlist)
do
ssh $host ls -al .profile
done
-----Original Message-----
From: CB [mailto:cbrown13800@hotmail.com]
Sent: Friday, August 04, 2006 10:01 AM
To: cygwin@cygwin.com
Subject: ssh breaks while loop
If file hostlist contains:
hosta
hostb
hostc
then execute this shell script:
while read host
do
ssh $host ls -al .profile
done < hostlist
the while loop executes one time and quits.
But,
while read host
do
echo $host
done < hostlist
executes 3 times.
Am I missing something or is this a bug?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/