delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/29/11:15:35

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Date: Thu, 29 Jan 2009 10:15:23 -0600 (CST)
From: Tim McDaniel <tmcd AT panix DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: read file with windows filenames
In-Reply-To: <glsjq7$6fv$1@ger.gmane.org>
Message-ID: <Pine.NEB.4.64.0901291011590.24062@panix1.panix.com>
References: <glsjq7$6fv$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Thu, 29 Jan 2009, Matthias Meyer wrote:
> while IFS= read -r cLine
> do
>        echo "$cLine"
>        attrib +H "$cLine"
> done < restoreFiles.tmp
> rm -f restoreFiles.tmp
>
> will stop the while loop after the first call of attrib:
>
> + echo 'C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500'
> C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500
> + attrib +S 'C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500'
> + IFS=
> + read -r cLine
> + test 0 -gt 0
> + rm -f restoreFiles.tmp
>
> Did anyone know what happens there?

Given that the debug output has "attrib +S" but the code at top has
"attrib +H", and that the debug output has "test 0 -gt 0" that the
code doesn't have just before the loop exit, it is probably necessary
for you to publish the actual code that's failing, even if it has
details that you're "100% certain" are irrelevant and unimportant.

-- 
Tim McDaniel, tmcd AT panix DOT com

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