delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/23/15:46:12

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:to:from:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=yHn
yESkq8vMT2O1JVLnf+VjPQ+QOY33V7F9bVPpE/HOd9zpv9ckal0tvhQjsWinA4VB
NdjvCMHuGlpiV2aTSG+YvGMuU0tPu68j5IFHOCt3ttCCdxjctGLsUfBnDMq9svFu
JmWVdwbONKuswKQzprAbLn4dq8bSnFVr+1ajZ6L0=
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:to:from:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; s=default; bh=pd6+bMP+z
3b9/SJHo27XrRWDZp0=; b=g73e9SnxOZEEFdZGNEwEanJvhdjc1s5gj9ze0Y2GM
2/7Ab/HLgnHzbHkqcXRyZNKK7JKN9RMGeQqd9Hv1wVdFXyYpSp7ml8+RrakCzUHU
Fxb7hToYTbDAVY0fpmc0+N3GgRd8c+rhbm1NYHP2L34rvxMi3/sDJCtjjSvupuTP
nY=
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=-0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-pa0-f50.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=to:from:subject:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=CQJdw0cwMlawE2jRxYmJbNxxdVrrdT9zVoawKXouaD4=; b=iUnIbu3aN3+IdAkL9QGMkBIoo/e3S/d0Sv8Saak1u2qV+VxiBHmEmXWgjcl2fK3vuD nVsXmE7RpN85BZchiD8PF67q3lORlkm8oDmRmS7b4fb+DnNnvvt75jhZ//WaoxMX68oP mYrF4JpO44sfj8wiqPW1ES2CsmEn8Ku3ANJVqz3wBoNEqJa8yms/8dSHAK4K5N9gb4Np CfhWJX/PUuQNH2sSBSGty4w0OlwPc8WcrrXlnQNrXuTudK7pf1EDDrUBgJb55dwS1W0G XiHqm4JW9rxgvBh3xqKp9tMV2ywalFY0xSDDmtnKDvaAY9gRN+UcVpvhkzejGuSS+wtf b+ZQ==
X-Received: by 10.68.163.97 with SMTP id yh1mr37647755pbb.36.1448311555011; Mon, 23 Nov 2015 12:45:55 -0800 (PST)
To: cygwin AT cygwin DOT com
From: "Matt D." <matt AT codespunk DOT com>
Subject: Calling cygpath from find exec?
Message-ID: <56537B03.4050204@codespunk.com>
Date: Mon, 23 Nov 2015 12:45:55 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0

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


Matt D.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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