delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/11/16/07:51:50

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.4.1 sourceware.org C6C1C395A006
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=ilyaz.org
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=math.berkeley.edu
Date: Wed, 16 Nov 2022 04:50:48 -0800
From: Ilya Zakharevich <nospam-abuse AT ilyaz DOT org>
To: cygwin AT cygwin DOT com
Subject: --text option of grep v3.7-2 not working
Message-ID: <20221116125047.xmrb6zmkmepoxbiv@math.berkeley.edu>
MIME-Version: 1.0
User-Agent: NeoMutt/20170113 (1.7.2)
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,
HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY,
SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

--wceegksrmzmlcgnp
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

grep with -a (or --text) option does not strip CR from line ends

	Broken in: CYGWIN_NT-6.1     Bu 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
	       	   grep (GNU grep) 2.21

	Works  in: CYGWIN_NT-6.1-WOW Bu 2.2.1(0.289/5/3) 2015-08-20 11:40 i686   Cygwin
	       	   grep (GNU grep) 3.7
	       	   Packaged by Cygwin (3.7-2)

To reproduce, do in CMD’s command line:

  D:\> D:\Programs\cygwin2022\bin\perl -we "print qq(abc\r\n)" | D:\Programs\cygwin2022\bin\grep -a "abc$"

This does not emit anything (contrary to the man page, which says:

      If grep decides the file is a text file, it strips the CR
      characters from the original file contents (to make regular
      expressions with ^ and $ work correctly).

(The same happens on Win10.)

Hope this helps,
Ilya

P.S.  It seems that the mailing list does not allow attaching the output!
        So I retry with a shortened version…

--wceegksrmzmlcgnp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cygcheck.out-censored-shorten"
Content-Transfer-Encoding: quoted-printable


Cygwin Configuration Diagnostics
Current System Time: Mon Nov 14 21:37:17 2022

Windows 7 Home Premium Ver 6.1 Build 7601 Service Pack 1

Path:	d:\Programs\cygwin2022\bin
	C:\Program Files (x86)\Common Files\Oracle\Java\javapath
	C:\Program Files\Common Files\Microsoft Shared\Windows Live
	C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live
	C:\Program Files (x86)\Intel\iCLS Client\
	C:\Program Files\Intel\iCLS Client\
	C:\Windows\system32
	C:\Windows
	C:\Windows\System32\Wbem
	C:\Windows\System32\WindowsPowerShell\v1.0\
	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
	C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
	C:\Program Files\Intel\WiFi\bin\
	C:\Program Files\Common Files\Intel\WirelessCommon\
	C:\Program Files\Lenovo\Bluetooth Software\
	C:\Program Files\Lenovo\Bluetooth Software\syswow64
	.
	C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
	C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
	C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
	C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
	C:\Program Files (x86)\Windows Live\Shared

Output from d:\Programs\cygwin2022\bin\id.exe
UID: 197608(***)              GID: 197121(None)
197121(None)                   545(Users)
4(INTERACTIVE)                 66049(CONSOLE LOGON)
11(Authenticated Users)        15(This Organization)
113(Local account)             4095(CurrentSession)
66048(LOCAL)                   262154(NTLM Authentication)
401408(Medium Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

Path =3D 'd:\Programs\cygwin2022\bin;C:\Program Files (x86)\Common Files\Or=
acle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows L=
ive;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Pr=
ogram Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:=
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\W=
indowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;=
C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\=
WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Fi=
les\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\s=
yswow64;;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C=
:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program =
Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program File=
s (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x=
86)\Windows Live\Shared'

ALLUSERSPROFILE =3D 'C:\ProgramData'
APPDATA =3D 'C:\Users\***\AppData\Roaming'
CommonProgramFiles =3D 'C:\Program Files\Common Files'
CommonProgramFiles(x86) =3D 'C:\Program Files (x86)\Common Files'
CommonProgramW6432 =3D 'C:\Program Files\Common Files'
COMPUTERNAME =3D '***'
ComSpec =3D 'C:\Windows\system32\cmd.exe'
configsetroot =3D 'C:\Windows\ConfigSetRoot'
FP_NO_HOST_CHECK =3D 'NO'
HOMEDRIVE =3D 'C:'
HOMEPATH =3D '\Users\***'
JD2_HOME =3D 'D:\Programs-Installed\JDownloader'
LOCALAPPDATA =3D 'C:\Users\***\AppData\Local'
LOGONSERVER =3D '\\***'
NUMBER_OF_PROCESSORS =3D '4'
OS =3D 'Windows_NT'
PATHEXT =3D '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PROCESSOR_ARCHITECTURE =3D 'AMD64'
PROCESSOR_IDENTIFIER =3D 'Intel64 Family * Model * Stepping *'
PROCESSOR_LEVEL =3D '*'
PROCESSOR_REVISION =3D '***'
ProgramData =3D 'C:\ProgramData'
ProgramFiles =3D 'C:\Program Files'
ProgramFiles(x86) =3D 'C:\Program Files (x86)'
ProgramW6432 =3D 'C:\Program Files'
PROMPT =3D '$P$G'
PSModulePath =3D 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'
PUBLIC =3D 'C:\Users\Public'
SESSIONNAME =3D 'Console'
SystemDrive =3D 'C:'
SystemRoot =3D 'C:\Windows'
TEMP =3D 'C:\Users\***\AppData\Local\Temp'
TMP =3D 'C:\Users\***\AppData\Local\Temp'
USERDOMAIN =3D '***'
USERNAME =3D '***'
USERPROFILE =3D 'C:\Users\***'
windir =3D 'C:\Windows'
windows_tracing_flags =3D '3'
windows_tracing_logfile =3D 'C:\BVTBin\Tests\installpackage\csilogfile.log'

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
		***  See below ***
  ******** =3D '\??\D:\Programs\cygwin2022'
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\Program Opt=
ions
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin\Installations
	*************
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin\Program Options

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  User:   Key: ************* Path: ************
  		  6 more lines
  User:   Key: ************* Path: D:\Programs\cygwin2022

c:  hd  NTFS    ****Mb ***% CP CS UN PA FC    QU  Windows7_OS
d:  hd  NTFS    ****Mb ***% CP CS UN PA FC    QU  User Data
				*******
v:  cd             N/A    N/A                      =20

d:\Programs\cygwin2022      /          system  binary,auto
D:\Programs\cygwin\home     /home      system  binary
none                        /tmp       system  binary,posix=3D0
d:\Programs\cygwin2022\bin  /usr/bin   system  binary,auto
d:\Programs\cygwin2022\lib  /usr/lib   system  binary,auto
cygdrive prefix             /cygdrive  user    binary,posix=3D0,auto

Found: d:\Programs\cygwin2022\bin\awk
 -> d:\Programs\cygwin2022\bin\gawk.exe
Found: d:\Programs\cygwin2022\bin\bash.exe
Found: d:\Programs\cygwin2022\bin\cat.exe
Found: d:\Programs\cygwin2022\bin\certutil.exe
Found: C:\Windows\system32\certutil.exe
Warning: d:\Programs\cygwin2022\bin\certutil.exe hides C:\Windows\system32\=
certutil.exe
Found: d:\Programs\cygwin2022\bin\clinfo.exe
Found: d:\Programs\cygwin2022\bin\comp.exe
Found: C:\Windows\system32\comp.exe
Warning: d:\Programs\cygwin2022\bin\comp.exe hides C:\Windows\system32\comp=
=2Eexe
Found: d:\Programs\cygwin2022\bin\convert
Found: C:\Windows\system32\convert.exe
Warning: d:\Programs\cygwin2022\bin\convert hides C:\Windows\system32\conve=
rt.exe
 -> d:\Programs\cygwin2022\bin\magick.exe
Found: d:\Programs\cygwin2022\bin\cp.exe
Found: d:\Programs\cygwin2022\bin\cpp.exe
Found: d:\Programs\cygwin2022\bin\crontab.exe
Found: d:\Programs\cygwin2022\bin\curl.exe
Found: d:\Programs\cygwin2022\bin\expand.exe
Found: C:\Windows\system32\expand.exe
Warning: d:\Programs\cygwin2022\bin\expand.exe hides C:\Windows\system32\ex=
pand.exe
Found: d:\Programs\cygwin2022\bin\find.exe
Found: C:\Windows\system32\find.exe
Warning: d:\Programs\cygwin2022\bin\find.exe hides C:\Windows\system32\find=
=2Eexe
Found: d:\Programs\cygwin2022\bin\ftp.exe
Found: C:\Windows\system32\ftp.exe
Warning: d:\Programs\cygwin2022\bin\ftp.exe hides C:\Windows\system32\ftp.e=
xe
Found: C:\Program Files\Lenovo\Bluetooth Software\ftp
Warning: d:\Programs\cygwin2022\bin\ftp.exe hides C:\Program Files\Lenovo\B=
luetooth Software\ftp
Found: d:\Programs\cygwin2022\bin\gcc.exe
Found: d:\Programs\cygwin2022\bin\gdb.exe
Found: d:\Programs\cygwin2022\bin\grep.exe
Found: d:\Programs\cygwin2022\bin\hostname.exe
Found: C:\Windows\system32\hostname.exe
Warning: d:\Programs\cygwin2022\bin\hostname.exe hides C:\Windows\system32\=
hostname.exe
Found: d:\Programs\cygwin2022\bin\kill.exe
Found: d:\Programs\cygwin2022\bin\klist.exe
Found: C:\Windows\system32\klist.exe
Warning: d:\Programs\cygwin2022\bin\klist.exe hides C:\Windows\system32\kli=
st.exe
Found: d:\Programs\cygwin2022\bin\ld.exe
Found: d:\Programs\cygwin2022\bin\ls.exe
Found: d:\Programs\cygwin2022\bin\make.exe
Found: d:\Programs\cygwin2022\bin\mv.exe
Found: d:\Programs\cygwin2022\bin\nslookup.exe
Found: C:\Windows\system32\nslookup.exe
Warning: d:\Programs\cygwin2022\bin\nslookup.exe hides C:\Windows\system32\=
nslookup.exe
Found: d:\Programs\cygwin2022\bin\patch.exe
Found: d:\Programs\cygwin2022\bin\perl.exe
Found: d:\Programs\cygwin2022\bin\replace.exe
Found: C:\Windows\system32\replace.exe
Warning: d:\Programs\cygwin2022\bin\replace.exe hides C:\Windows\system32\r=
eplace.exe
Found: d:\Programs\cygwin2022\bin\rm.exe
Found: d:\Programs\cygwin2022\bin\sed.exe
Found: d:\Programs\cygwin2022\bin\sh.exe
Found: d:\Programs\cygwin2022\bin\shutdown.exe
Found: C:\Windows\system32\shutdown.exe
Warning: d:\Programs\cygwin2022\bin\shutdown.exe hides C:\Windows\system32\=
shutdown.exe
Found: d:\Programs\cygwin2022\bin\sort.exe
Found: C:\Windows\system32\sort.exe
Warning: d:\Programs\cygwin2022\bin\sort.exe hides C:\Windows\system32\sort=
=2Eexe
Found: d:\Programs\cygwin2022\bin\ssh.exe
Found: d:\Programs\cygwin2022\bin\tar.exe
Found: d:\Programs\cygwin2022\bin\test.exe
Found: d:\Programs\cygwin2022\bin\timeout.exe
Found: C:\Windows\system32\timeout.exe
Warning: d:\Programs\cygwin2022\bin\timeout.exe hides C:\Windows\system32\t=
imeout.exe
Found: d:\Programs\cygwin2022\bin\vi.exe
Found: d:\Programs\cygwin2022\bin\vim.exe
Found: d:\Programs\cygwin2022\bin\whoami.exe
Found: C:\Windows\system32\whoami.exe
Warning: d:\Programs\cygwin2022\bin\whoami.exe hides C:\Windows\system32\wh=
oami.exe

	****
  198k 2015/04/29 d:\Programs\cygwin2022\bin\cygwin-crashreporter-hooks.dll=
 - os=3D4.0 img=3D0.0 sys=3D5.2
                  "cygwin-crashreporter-hooks.dll" v0.0 ts=3D1969-12-31 16:=
00
  292k 2018/02/27 d:\Programs\cygwin2022\bin\cygWINGs-3.dll - os=3D4.0 img=
=3D0.0 sys=3D5.2
                  "cygWINGs-3.dll" v0.0 ts=3D2018-02-27 02:01
  464k 2017/03/17 d:\Programs\cygwin2022\bin\cygwinpr-1.1.dll - os=3D4.0 im=
g=3D1.1 sys=3D5.2
                  "cygwinpr-1.1.dll" v0.0 ts=3D2017-03-16 21:32
   25k 2018/04/16 d:\Programs\cygwin2022\bin\cygwinpr-tools2-2.dll - os=3D4=
=2E0 img=3D2.0 sys=3D5.2
                  "cygwinpr-tools2-2.dll" v0.0 ts=3D2018-04-16 09:24
  709k 2018/04/16 d:\Programs\cygwin2022\bin\cygwinpr2-2.dll - os=3D4.0 img=
=3D2.0 sys=3D5.2
                  "cygwinpr2-2.dll" v0.0 ts=3D2018-04-16 09:24
	****
 3472k 2022/01/31 d:\Programs\cygwin2022\bin\cygwin1.dll - os=3D4.0 img=3D0=
=2E0 sys=3D5.2
                  "cygwin1.dll" v0.0 ts=3D2022-01-31 11:35
    Cygwin DLL version info:
        DLL version: 3.3.4
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 341
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix:=20
        Build date:=20
        Shared id: cygwin1S5


No Cygwin services found.


Cygwin Package Information
Last downloaded files to: K:\tmp\cygwin-install
Last downloaded files from: https://mirror.clarkson.edu/cygwin/

Package                                             Version                =
             Status
	******
base-cygwin                                         3.8-1                  =
             OK
base-files                                          4.3-3                  =
             OK
	******
cygwin                                              3.3.4-2                =
             OK
cygwin-devel                                        3.3.4-2                =
             OK
cygwin-doc                                          3.3.4-2                =
             OK
cygwin-x-doc                                        20211212-1             =
             OK
cygwin32                                            2.10.0-1               =
             OK
cygwin32-binutils                                   2.29-1                 =
             OK
cygwin32-default-manifest                           6.4-1                  =
             OK
cygwin32-gcc-core                                   6.4.0-1                =
             OK
cygwin32-gcc-fortran                                6.4.0-1                =
             OK
cygwin32-gcc-g++                                    6.4.0-1                =
             OK
cygwin32-gettext                                    0.19.5.1-1             =
             OK
cygwin32-libbfd                                     2.25.1-1               =
             OK
cygwin32-libiconv                                   1.14-2                 =
             OK
cygwin32-libtool                                    2.4.6-3                =
             OK
cygwin32-minizip                                    1.2.8-1                =
             OK
cygwin32-w32api-headers                             4.0.4-1                =
             OK
cygwin32-w32api-runtime                             4.0.4-1                =
             OK
cygwin32-zlib                                       1.2.8-1                =
             OK
	******

--wceegksrmzmlcgnp
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


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

--wceegksrmzmlcgnp--

- Raw text -


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