delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/23/16:14:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=XBf+hJ7HRILU7RfNYr/bOdCUBc/+3
mIel5zVZFDjIdY2MVqruqU76N3iK0LglWEXP7MVC7bnuzdEYqAE8YFn0vwqDwtgg
ChUD52fCOcOSz0mCIgWp8xS256VTKXNwdKXYTvomzJH6vH903D2XB9udRYx0jbjA
xMSI24COzLmqao=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=pViGKwrtaw4fLYDZaGOA5jXOhlE=; b=KMf
TA0PClt1d9Cazc5VFzmC4Vdk8kMAqd2k0/nhn535Bgsfqgi6wofIMNs+wd+I4Lxs
PWhg4zq5LbHSEOexzuUtOix6t5flF8wKBGRQDhcmd/9utGf1sB+ebTj9WcFCJL69
g/33Gx0SbiRjeH2ctAET/5FhhdUkUGa9P99E/5Cs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2
X-HELO: USA7109MR003.ACS-INC.COM
From: "Nellis, Kenneth" <Kenneth DOT Nellis AT xerox DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: Calling cygpath from find exec?
Date: Mon, 23 Nov 2015 21:14:18 +0000
Message-ID: <0D835E9B9CD07F40A48423F80D3B5A702E9CEE1A@USA7109MB022.na.xerox.net>
References: <56537B03 DOT 4050204 AT codespunk DOT com>
In-Reply-To: <56537B03.4050204@codespunk.com>
MIME-Version: 1.0
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id tANLEikX018954

From: Matt D.
> 
> Is there a reason why these produce different results?
> 
> find . -exec cygpath -wa {} \;
> find . -exec echo $(cygpath -wa {}) \;
> 
> I have to do this which is much slower:
> find . -exec bash -c 'echo $(cygpath -wa {})' \;
> 
> Or this:
> find . | while read a; do echo $(cygpath -wa $a); done

How about the following?

find . | cygpath -waf-

--Ken Nellis

- Raw text -


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