delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/09/30/12:07:42

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:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=vzc
rGxkXTBENg9W4D/Xd+Ee5xbXOxJCQ4uhA3TdCcJbjwipf0MzYvD9Pu2id43QYaYZ
AaHVC4idtmeYDSeH+FBjn6VL9epmyO4Yl3GkXrMlM38bes1j0S/WYJIGZsoSbh6Z
2JaSsHQNJVVT7QBNYiOs1yb9Ajll/IBtO4jBavKU=
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:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=MTmfZTh5P
Fq1r2vrbuEJC4vIMDU=; b=XUIw57ztJJwd6zSD+I1JbkuRPvLmyrnKc4x8PV0Ze
mSIzMB7EQcmqnzaKeVpu/lKdSzNBGruniAlCCyQLFrXYh4p6TWpbogUKlPYw6hzi
UA/MGiL7duf+nw5bH5wHFAaC90ILkeykNyr8ohDdMKwnluzjHaDK4lCpOqMCjjpS
uc=
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.6 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RDNS_NONE,SPF_FAIL autolearn=no version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Paul <Paul DOT Domaskis AT gmail DOT com>
Subject: Unexpected results: dirs =?utf-8?b?fA==?= xargs -n 1 cygpath -aw
Date: Mon, 30 Sep 2013 16:06:59 +0000 (UTC)
Lines: 27
Message-ID: <loom.20130930T180640-573@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

I'm doing something wrong with xargs.  If I simply use "cygpath -aw" with 2 
arguments, it works fine:

   $cygpath -aw ~/projects/project1 ~/projects/project2

      C:\cygwin\home\Fred.Ma\projects\project1
      C:\cygwin\home\Fred.Ma\projects\project2

If I use "xargs -n 1" with echo, it works fine:

   $dirs | xargs echo

      ~/projects/project1 ~/projects/project2

   $dirs | xargs -n 1 echo

      ~/projects/project1
      ~/projects/project2

However, if I use xargs with cygpath, it doesn't:

   $dirs | xargs -n 1 cygpath -aw

      C:\cygwin\home\UserName\projects\project1\~\projects\project1
      C:\cygwin\home\UserName\projects\project1\~\projects\project2

Thanks if anyone can explain what I'm doing wrong.


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