X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Matthias Meyer <matthias.meyer@gmx.li>
Subject:  Re: read file with windows filenames
Date:  Thu, 29 Jan 2009 23:19:25 +0100
Lines: 23
Message-ID:  <glta1g$q7j$1@ger.gmane.org>
References:  <glsjq7$6fv$1@ger.gmane.org> <Pine.NEB.4.64.0901291011590.24062@panix1.panix.com> <glsohj$pdg$1@ger.gmane.org> <f60fe000901290926g48db7d4fs1b5aa97321a454c5@mail.gmail.com>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7Bit
User-Agent: KNode/0.10.9
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Mark J. Reed wrote:

> For what it's worth, I've had intermittent problems with bash and
> while read loops where the loop aborts after one iteration whenever
> there's nontrivial code in the loop body, on multiple platforms, not
> just Cygwin.  So this might not be a Cygwin issue.  I've never been
> ble to isolate the problem enough to file a bug report, unfortunately.

Thanks to all.
The problem was a problem of this windows program attrib. /dev/null will
solve this problem. :-)

#!/bin/sh
while read -r cLine
do
        echo $cLine
        attrib ${cLine%%:*} "${cLine#*:}" < /dev/null
done < 2restore4

br
Matthias
-- 
Don't Panic


--
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/

