Bug in grep #2892
-
Setup
** insert your response here ** Details
** insert your response here **
20 should be found 20 should be found
20 should be found 20 should be found
** insert URL here ** |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
I am embarrassed to admit that I do not understand what this report is trying to tell me. Did you mean to show the actual contents of |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the lack of clarity. The contents of test.txt is grep is ignoring the ^ in pattern matching, so grep ^20 is matching in line with text x20 should not be found. Grep works properly in ubuntu 20 command line etc, and also in the versions in C:\Program Files\Git\bin\bash.exe and sh.exe. This affects other software that imports git-for-windows such as cmder |
Beta Was this translation helpful? Give feedback.
-
|
Are you sure there's a bug? ^ is the shell escape character in cmd.exe |
Beta Was this translation helpful? Give feedback.
-
|
As Project-Magenta mentioned, I'm pretty sure this is due to |
Beta Was this translation helpful? Give feedback.
-
|
so kind of like a Git CMD bug
Not really a bug per se... more of a difference in expectation vs
implementation. This was an artifact of Windows' built-in cmd.exe
interpreter, which simply behaves differently than a unix-like shell...
it's handling of quoted arguments being another notable example, IIRC. As a
result, it's not really all that uncommon to need to tweak command syntax
slightly when working on the Git CMD side of the fence. The differences can
most certainly be confusing, however.
…--
"In the beginning the Universe was created. This has made a lot of people
very angry and been widely regarded as a bad move." -Douglas Adams
|
Beta Was this translation helpful? Give feedback.
-
|
that's why I edited |
Beta Was this translation helpful? Give feedback.
Are you sure there's a bug? ^ is the shell escape character in cmd.exe