delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/10/16:47:20

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=IeE33cDKm3NmHFeNKIQTRJlUoh92b
TpZXuaVcs+po8Hw50Y5Kw7FtNvYAYqP8ftWMTbRqeBFVB222AVGZTwgmr3blaG3A
K1rrqiKfnP6OWsrvkfqbNVxrHmQpSVSplvrcKMkkzKISNpglJwUCVNTPqK+0+gZQ
u5xBuclrVS4Ta4=
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=/747GPs7r3WWqkB31xp9RDFwxxs=; b=ynv
ynNP15kYzcbFTxXCuApNdTKcD1LHxWXTkqbD/bFI3TTJ5orcS4Qa8AqFQ7w3Uiuq
qYXAGLB2gZqTQRhxdccK4k6zzCX00ILuZZ3gz53Hg9rZxsMbeddKB70famvE28XN
M7grl1isTSeYOEd5cC9Qp1hhxNQ2EuRAZs4lX57M=
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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1737, glob
X-HELO: esa6.dell-outbound.iphmx.com
From: "Gluszczak, Glenn" <Glenn DOT Gluszczak AT dell DOT com>
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com v1ALkZSh001279
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com v1ALkZSh001279
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: cygpath
Date: Fri, 10 Feb 2017 21:46:20 +0000
Message-ID: <91DCAC3CB99C724EB365BB64677FBE7B139C41@MX204CL04.corp.emc.com>
References: <91DCAC3CB99C724EB365BB64677FBE7B139A86 AT MX204CL04 DOT corp DOT emc DOT com> <151946397 DOT 20170210223617 AT yandex DOT ru> <91DCAC3CB99C724EB365BB64677FBE7B139AF9 AT MX204CL04 DOT corp DOT emc DOT com> <126350824 DOT 20170211003439 AT yandex DOT ru>
In-Reply-To: <126350824.20170211003439@yandex.ru>
MIME-Version: 1.0
X-Sentrion-Hostname: mailusrhubprd51.lss.emc.com
X-RSA-Classifications: public
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v1ALlJxF030020

I suppose the glob explanation from Michael explains this behavior in sh.
Though unsupported, it seems to work (probably some side cases do not).

$ cygpath -w /usr/bin/*
C:\cygwin64\bin\[.exe
C:\cygwin64\bin\2to3
C:\cygwin64\bin\addftinfo.exe
C:\cygwin64\bin\addr2line.exe
C:\cygwin64\bin\whatis.exe
C:\cygwin64\bin\ar.exe
C:\cygwin64\bin\arch.exe
C:\cygwin64\bin\as.exe
C:\cygwin64\bin\ash.exe
C:\cygwin64\bin\gawk.exe
C:\cygwin64\bin\b2sum.exe
....



-----Original Message-----

Greetings, Gluszczak, Glenn!

> * is a legal character for ls but perhaps not cygpath?

"*" is not a legal path name character. And cygpath expects a path.

> I don't know.
> No files or directories are using * in the name. 

See above.

> Not sure about incorrect terminal settings as I never touched any.  
> It shows up in mintty and ssh equally. The characters that appear vary.

For me, it shows a single blank box character. (The required character is missing from the font I'm using in mintty.)

> Some non-existent paths do *not* produce the gibberish.

> %%%cygpath -w /aaa/bbb/*
> C:\cygwin\aaa\bbb\

Works equally for me.

$ cygpath -w /usr/non-existent/* | od -t x1
0000000 43 3a 5c 50 72 6f 67 72 61 6d 73 5c 43 79 67 77
0000020 69 6e 5f 36 34 5c 75 73 72 5c 6e 6f 6e 2d 65 78
0000040 69 73 74 65 6e 74 5c ef 80 aa 0a
0000053

$ cygpath -w /aaa/bbb/* | od -t x1
0000000 43 3a 5c 50 72 6f 67 72 61 6d 73 5c 43 79 67 77
0000020 69 6e 5f 36 34 5c 61 61 61 5c 62 62 62 5c ef 80
0000040 aa 0a
0000042

Also please don't top-post https://cygwin.com/acronyms/#TOFU and don't quote raw email addresses. https://cygwin.com/lists.html


--
With best regards,
Andrey Repin
Saturday, February 11, 2017 00:27:02

Sorry for my terrible english...


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