Created
March 30, 2020 15:49
-
-
Save fenollp/47626279396874711e5d399cb3255162 to your computer and use it in GitHub Desktop.
macOS (BSD) `grep` bug (incompatibility) when using `-mX` with `-Ay` (but not with `-By` nor `-Cy`)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep --version && uname -v | |
# grep (BSD grep) 2.5.1-FreeBSD | |
# Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 | |
grep -A1 -E "urls = \[" */WORKSPACE | |
# example_http_archive_locked/WORKSPACE: urls = [ | |
# example_http_archive_locked/WORKSPACE- "https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", | |
#but: | |
grep -m1 -A1 -E "urls = \[" */WORKSPACE | |
# example_http_archive_locked/WORKSPACE: urls = [ | |
#whereas: | |
grep -m1 -C1 -E "urls = \[" */WORKSPACE | |
# example_http_archive_locked/WORKSPACE- type = "tar.gz", | |
# example_http_archive_locked/WORKSPACE: urls = [ | |
#and on Linux: | |
grep -m1 -A1 -E "urls = \[" */WORKSPACE | |
# example_http_archive_locked/WORKSPACE: urls = [ | |
# example_http_archive_locked/WORKSPACE- "https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", | |
#also on Linux: | |
grep --version | |
# grep (GNU grep) 2.27 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment