delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/04/10:01:01

Message-Id: <200608041401.k74E0sIt016229@delorie.com>
X-Spam-Check-By: sourceware.org
Date: Fri, 4 Aug 2006 14:00:44 +0000 (GMT)
X-Comment: Sending client does not conform to RFC822 minimum requirements
X-Comment: Date has been added by Maillennium
From: CB<cbrown13800 AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: ssh breaks while loop
X-Mailer: BlackBox Mail 3 (Developed by B. Ford)
Mime-Version: 1.0
X-MailerDownload: http://homepage.eircom.net/~informail
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019