zlacker

[return to "The Source History of Cat"]
1. zeveb+A4[view] [source] 2018-11-12 23:41:15
>>janvdb+(OP)
> But, if you pull up the manual page for something like grep, you will see that it has not been updated since 2010 (at least on MacOS).

Well, GNU grep was last released 16 months ago, and the last change to its master branch was 4 weeks ago: http://git.savannah.gnu.org/cgit/grep.git

FreeBSD's grep was last updated back in August: https://github.com/freebsd/freebsd/tree/master/usr.bin/grep

OpenBSD's grep was last updated 11 months ago: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/

Oddly, it looks like the Darwin grep was last updated in 2012: https://opensource.apple.com/source/text_cmds/text_cmds-99/g...

Strange that Apple would be shipping such an ancient grep.

◧◩
2. setr+T6[view] [source] 2018-11-13 00:07:14
>>zeveb+A4
Iirc, Apple stopped updating but continued shipping all gnu utilities since gplv3 was attached to them
◧◩◪
3. LukeSh+qg[view] [source] 2018-11-13 01:52:02
>>setr+T6
I don't believe that macOS grep was ever GNU grep. I believe that macOS always used a BSD variant of grep.
◧◩◪◨
4. yesena+hp[view] [source] 2018-11-13 03:33:12
>>LukeSh+qg
Using OS X 10.4.11 here, the grep file is dated Jan 2006, the end of the grep man pages says "2002/01/22".

  $ uname -v
  Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386
  $ grep --version
  grep (GNU grep) 2.5.1
Other man pages: ed says 1993, sed says BSD 2004, cat says 3rd Berkeley Distribution 1995.
◧◩◪◨⬒
5. LukeSh+9t[view] [source] 2018-11-13 04:15:10
>>yesena+hp
Interesting. What does `type grep` say? Is it possible that it's /usr/local/bin/grep from homebrew/macports/…, and that /usr/bin/grep is BSD grep?

I found a comment claiming that prior to 10.8 (2012, Mountain Lion) it used GNU grep, but nothing I'd feel comfortable citing.

◧◩◪◨⬒⬓
6. yesena+RA[view] [source] 2018-11-13 06:17:31
>>LukeSh+9t

  $ type grep
  grep is hashed (/usr/bin/grep)
It does seem to be the original grep for this machine (it's a Mac Mini) - it has the same Jan 2006 date as most of the files in /usr/bin, and nothing has an earlier date. There's no other file called grep elsewhere.
[go to top]