ssh breaks while loop
Larry Hall (Cygwin)
reply-to-list-only-lh@cygwin.com
Fri Aug 4 15:02:00 GMT 2006
CB wrote:
> 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?
This isn't Cygwin-specific so it's off-topic for this list.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
--
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/
More information about the Cygwin
mailing list