On 2024-03-16 13:08, Kevin Schnitzius via Cygwin wrote:
On Saturday, March 16, 2024 at 02:02:31 PM EDT, Michael Goldshteyn via Cygwin
wrote:
$ grep -c -P '000$' a
0
# Now you may be thinking, OK, it's because of the CR/LF line ending
$ LC_ALL=en_US grep -c --binary-files=text -P '000$' a
0
On Saturday, March 16, 2024 at 02:02:31 PM EDT, Michael Goldshteyn via Cygwin
wrote:
> $ grep -c -P '000$' a
> 0
> # Now you may be thinking, OK, it's because of the CR/LF line ending
$ LC_ALL=en_US grep -c --binary-files=text -P '000$' a
0
$ LC_ALL=en_US grep -c --binary-files=text -P '000\r
I just updated my Cygwin64 installation, which includes the grep
utility and its behavior has changed. It no longer works like it used to
for Perl reg-ex matching, as demonstrated below:
Simple test cases:
==
$ ls -l a
-rwxr-xr-x 1 Michael None 6 Mar 16 12:15 a
$ hexdump -C a
3 matches
Mail list logo