BSD's (also called Apple gzip) zcat as in MacOS (unlike GNU zcat) looks for .Z files (compressed with zip). So on mac this will not work as it would on linux
% zcat debug.txt.gz
zcat: can't stat: debug.txt.gz (debug.txt.gz.Z): No such file or directory
zcat --version
Apple gzip 321.100.11
Indeed, there is some BSD logic to it: zcat => .Z files, gzcat => .gz files, bzcat => .bz2 files (while gzcat and zcat are both part of Apple gzip....)
Welcome. 1) Please make the title more informative so people with the same issue can find your question and answer and 2) "doesn't work" isn't a very helpful way of describing a problem - be more specific and why what exactly doesn't work and how, and you will get a better answer. Thanks.
One can
linuxifymacOS to use GNU versions: https://github.com/darksonic37/linuxifyUhhhh, why would I do that???
probably to make commands work the same way ...
simple commands like
sedor even something as simple aslswork differently on the BSD-derived Mac OSthe differences are subtle enough to make debugging quite difficult
These sorts of differences plus annoyances with compilation on different platforms is why I use Ubuntu-based containers for almost everything these days, but this is a different discussion...
Sorry, I was just kidding. It is most important to know about these subtle differences and why they exist, but I sort of grew up with this. If these BSD tools come as part of Apple OS I would personally never replace them, possibly install them in addition in my path. There might be some side effects, though rather unlikely.