This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]