Closed biziclop closed 3 years ago
Uh, while you’re here, I’m planning a change involving grep -Pqz
or grep --perl-regexp --quiet --null-data
. Can you confirm that these options are supported on MacOS?
Hi, here is a dump of man grep
on macOS High Sierra (10.3):
https://pastebin.com/raw/LknRA0Tc
-E, --extended-regexp
, -G, --basic-regexp
which might be relevant. -q, --quiet, --silent
mode: “Quiet mode: suppress normal output. grep will only search a file until a match has been found, making searches potentially less expensive.” --null
option: “Prints a zero-byte after the file name.” Here is man re_format
: https://pastebin.com/raw/84m4niFf
I have to think about the other questions. Anyway, I pull-requested my version mainly for comparison, but of course it would be nice to have a one-click solution for each platform, so I will try to fix my version (and answer your questions).
Thanks!
Okay, I actually managed to find an alternative that only uses -Eq
. It’s the fix for #5, which I’ll commit after some testing.
it would be nice to have a one-click solution for each platform
Yes, but if the script effectively devolves into something like
if [[ os = 'MacOS' ]]; then
# Entire script with MacOS syntax
else
# Entire script with Linux syntax
fi
then I’m not convinced that it’s worth it to keep everything in one file.
As this repo has moved on quite far by now, I’ll close this PR. I will not be able to test anything on a Mac, currently, so it is up to you to keep your fork up and running. Good luck!
Suggested macOS (High Sierra) support while trying to keep compatibility.
Also, I would post a pull request to Marco Bonardo's hair for being a total uncooperating bonehead.