From nobody Sat Mar 09 16:37:11 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TsTH13PZCz5DX2Y for ; Sat, 9 Mar 2024 16:37:49 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TsTH11GL4z3x0H for ; Sat, 9 Mar 2024 16:37:49 +0000 (UTC) (envelope-from kudzu@tenebras.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6e5b1c6daa3so1584667b3a.1 for ; Sat, 09 Mar 2024 08:37:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenebras-com.20230601.gappssmtp.com; s=20230601; t=1710002268; x=1710607068; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KMO9C9nnxvdVnvIb8W7/wvXHzkiXyx0BhutDhpXWWkc=; b=kP7EwBepkLUBXSMCjIykhuciJwlS8VtHNP6ovFiGb6OnSi2l68HzMQPJVGk7DNIZG6 5VEjMA1eQ9pSo4b+KWmwzHlqL/786+X9IIm5hL1rMBpI660NskZiK8ApuyJA023pqb0k nRGcPrnOB5owG3sQQFVWuQBbYl+YjxJKl8LVTs1y58ETSPgD7OcHxmQtg+znmy5I9HuW hF8DFrxEiZ/k5y7aJVe08stIMREOvkXukQ4a5AdErl2L7PdvR2cbLHwv31xVHjPAjwm+ jVc8r5r8rmLHNDQgDQgdIK9Y3a5VoKVdaaW59byGU0ir5ESbWZsmLMpPXUHt8iXQ53Tr jVdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710002268; x=1710607068; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KMO9C9nnxvdVnvIb8W7/wvXHzkiXyx0BhutDhpXWWkc=; b=uWZ+qrsEkMsh8Fm0to7WoFPZNorrwpo259n9RlU1x9EinPU6FtU/g0jBINGVFJXrLG 2EdEDXdLm/mpC4TfbBFiE4noCKOqtEAFE1p/idjy2ciC3nQjk9XbrpH/uixq9P0yACJT jx4XoyNcnPzv2D/39l7YuIure6c34syaQn1ZwAbqaURLz5iPPjZXgmDoL5HS4G5xrA25 WBV4NrP2+M4zkCCndUQOyePkgOiqxWoTO1vDaJzhz9QXTsxrhCtzcKHbndS8pZUEkh80 GegTzzlvD6aRbpW1vDJxs3M42bhIaYfQk8PAL6KrqDXi76p8Ee+ZS1bN8RHOyfKCAkdc rRQQ== X-Gm-Message-State: AOJu0YxmM1+ldMwGGIBNun/9qQ582jeGROq7uLrBMjUZoREmCReioenQ 42+B+JqbDHuzpivZGI1ypeRz+MFTRrGH2lQ7Ftr6NMC8PWTLVkPv3JmpOcZ33GzW2P1G/pdvKtv 6yM1Jkcft9cYtXXnUGyV5OTlbwkDn+NDBVbzx8oiZ3cdghB/KsyE= X-Google-Smtp-Source: AGHT+IH1YGjaKFJ47rOr3MebnR8sSSwPvUTPZcdpjkqNyAddPBESrjJsiWsapWpQPt7CEcHXrPoSUQLbuG+mteajRgY= X-Received: by 2002:a05:6a20:2589:b0:1a1:41a3:9b54 with SMTP id k9-20020a056a20258900b001a141a39b54mr2634631pzd.32.1710002267688; Sat, 09 Mar 2024 08:37:47 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Michael Sierchio Date: Sat, 9 Mar 2024 11:37:11 -0500 Message-ID: Subject: Re: 'ls' name and 'ls | grep name' different To: =?UTF-8?B?z4YgRGjDqW5pbiBKZWFuLUphY3F1ZXM=?= Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000bb29c306133ced9b" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4TsTH11GL4z3x0H --000000000000bb29c306133ced9b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Mar 9, 2024 at 11:19=E2=80=AFAM =CF=86 Dh=C3=A9nin Jean-Jacques wrote: > Bonjour, > > I explain it as simple as possible: > > :; set | egrep 'LC_A|LANG' > GDM_LANG=3Dfr_FR.UTF-8 > LANG=3Dfr_FR.UTF-8 > LC_ALL=3Dfr_FR.UTF-8 > SLIM_LANG=3Dfr_FR.UTF-8 > > :; ls -i 1989* ; ls -i | grep 1989 ; ls -ib 1989* ; ls -ib | grep 198= 9 > 9920 1989 Amn*??*sia.mp4 > 9920 1989 Amn*=C3=A9*sia.mp4 > 9920 1989 Amn\303\251sia.mp4 > 9920 1989 Amn\303\251sia.mp4 > > Bonjour J-J =E2=80=93 It's not that the pipe modifies the stream, it's that 'ls' has decided that 'e-accent-aigu' is unprintable in the current locale. Try ls -B and then investigate the locale. *-B* Force printing of non-printable characters (as defined by *ctype*(3) and current locale settings) in file names as *\**xxx*, where *xxx* is the numeric value of the character in octal. This option is not defined in IEEE Std 1003.1-2008 ("POSIX.1"). > --000000000000bb29c306133ced9b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Mar 9, 2024 at 11:19=E2=80=AF= AM =CF=86 Dh=C3=A9nin Jean-Jacques <dhenin@gmail.com> wrote:
Bonjour,=C2=A0

I explain=C2=A0 it as simple as possible:

:; =C2=A0set | egrep 'LC_A|LANG&#= 39;
GDM_LANG=3Dfr_FR.UTF-8
LANG=3Dfr_FR.UTF-8
LC_ALL=3Dfr_FR.UTF-8
SLIM_LANG=3Dfr_FR.UTF-8

:; =C2=A0ls -i =C2=A01989* ; ls -i | grep 1989 ; =C2=A0ls -ib =C2=A01= 989* ; ls -ib | grep 1989
9920 1989 Amn??sia.mp4
=C2=A09920 1989 Amn=C3=A9sia.mp4
9920 1989 Amn\303\251sia.mp4=
=C2=A09920 1989 Amn\303\<= span style=3D"background:none">251sia.mp4


Bonjour J-J =E2= =80=93

It's not that the pipe modifies the stream, it'= ;s that 'ls' has decided that 'e-accent-aigu' is unprintabl= e in the current locale.=C2=A0

Try ls -B and then investigate the lo= cale.=C2=A0=C2=A0

-B      Force  printing	of  non-printable  characters  (as  defined by
	       ctype(3)	and current locale settings) =
in	file  names  as	 \xxx,
	       where xxx is the	numeric	value of the character in octal.  T=
his
	       option is not defined in	IEEE Std 1003.1-2008 ("POSIX.1")=
.


=C2=A0
3D"==20
--000000000000bb29c306133ced9b--