delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/05/18/14:04:25

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 372733893647
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=dinwoodie.org
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=adam AT dinwoodie DOT org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=dinwoodie.org; s=google;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=+hcFsL4aTpyDYHLi0ud/fCFPwtCgnhfLDOC89XR24qs=;
b=NdA49U+luoatMKzQYCt+pgxrroCWOnAudrG1mWSYo1gCn8keyecMfFtCuf0SDrb9Ra
RiRDUgpKlEr7DjAkaUPqx6vZyqcQ1q1U8Sxhnu7mnfkeX+Rv0ugls8+QUd3qEqVriQkI
kcr8f21MspIlQqZeSoqlijL/vX7tR4ZH6skGw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=+hcFsL4aTpyDYHLi0ud/fCFPwtCgnhfLDOC89XR24qs=;
b=pd5W3Ubp0OPLrGLcFPI+dhPGdQskWHcVOja5P3K502+n/q7jyOF4kNyPlrbXIE/2A0
klNlZ3zBAXYJxphnJAybj5QxwHzYS1XBZXYsCJd3nEwbF1rHApJ+ZtKfuDdKtfl1htqe
3U87z9BZ1YKw1GPuoQZER6VXrtuVIq6m4hTSgC0MWigJxdzNc4/lZXtfE7IZBB5STp3I
iRPF7ekaJr4YyJEjhg8FT8eEnryS6kqn8aNe7KSxkUMtrMh+jA8VyjY/X2+BJg9czvB9
gPnjtBm5NFW/vJcN1jPaOrS545ts7qrgBHOq7fTZxUkm2POqdKFPq/UsLc/AUVxWpPiS
DcRQ==
X-Gm-Message-State: AOAM533QrjRcY4nT6xzvkZNMtcquUVlSmICT6xXw6ka2enj1moSnzNX0
z/VlBKIpPKnBoBIG51yOoOD0IVYTtIcY/r/xyeOom27f2yI=
X-Google-Smtp-Source: ABdhPJxEzziRXbtizRDdnOgcjMEn4PdJ8gI+PyeL/j+/ZJaObA50CdHqMPtDrcnUslTIAP1GekKc0TSmmIKyjosqHPo=
X-Received: by 2002:a67:de0a:: with SMTP id q10mr12458531vsk.138.1589825018434;
Mon, 18 May 2020 11:03:38 -0700 (PDT)
MIME-Version: 1.0
References: <4319b2cc-07c0-8739-f87d-2c2cebbecae7 AT jeffunit DOT com>
<1975574327 DOT 20200518185545 AT yandex DOT ru>
<c8346953-4241-e51d-6b3d-a5ce64a66e0e AT jeffunit DOT com>
In-Reply-To: <c8346953-4241-e51d-6b3d-a5ce64a66e0e@jeffunit.com>
From: Adam Dinwoodie <adam AT dinwoodie DOT org>
Date: Mon, 18 May 2020 19:03:00 +0100
Message-ID: <CA+kUOakpSETMesmnnnazr+50r37tCJ0Ua=+LOXsEdtaEC0=cTQ@mail.gmail.com>
Subject: Re: wildcards don't work in directory with files with odd characters
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,
SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Mon, 18 May 2020 at 17:21, jeff wrote:
>
> On 5/18/2020 8:55 AM, Andrey Repin wrote:
> > Greetings, jeff!
> >
> >> I have a directory that has some files with odd files.
> >> I can do a 'ls', successfully. However if I do a 'ls *'' I get:
> >> ls: cannot access '*': No such file or directory
> >> Here is ls output:
> >> 'Highlander-S03E21-Final'$'\303\251''_Part_I-22.mkv'
> >> 'Highlander-S03E22-Final'$'\303\251''_Part_II-23.mkv'
> >> I am pretty sure this used to work.
> >> This is not specific to ls. wc has the same behavior for example.
> > Are you trying to run it from Cygwin shell or from some native one, like cmd?
> >
> I am running from windows 'command prompt' aka cmd. When run from bash
> everything seems to work correctly.

In which case this is expected behaviour: Cygwin's `ls` expects the
shell (e.g. Bash) to expand globs like `*`, but Windows' command
prompt expects applications to handle expanding globs (or the Windows
equivalents thereof) themselves. When you call a Cygwin command like
`ls` directly from the Windows command prompt, Windows passes the
arguments as-is to the Cygwin command, and the Cygwin command assumes
that the arguments it received are already appropriately expanded.

If this was working previously, I can only assume it's because you
were calling Windows' `ls` (which I seem to recall exists and is
essentially an alias for `dir`), which expects Windows semantics and
therefore handles its own expansions.

HTH

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

- Raw text -


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