News for hackers. Stuff that matters.
Re:The Source History of Cat by setr on Monday November 12, 2018 @07:07PM (#18437162)
Iirc, Apple stopped updating but continued shipping all gnu utilities since gplv3 was attached to them
Re:The Source History of Cat by LukeShu on Monday November 12, 2018 @08:52PM (#18437753)
I don't believe that macOS grep was ever GNU grep. I believe that macOS always used a BSD variant of grep.
Re:The Source History of Cat by yesenadam on Monday November 12, 2018 @10:33PM (#18438302)
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.
Re:The Source History of Cat by LukeShu on Monday November 12, 2018 @11:15PM (#18438542)
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.

Re:The Source History of Cat by yesenadam on Tuesday November 13, 2018 @01:17AM (#18439020)

  $ 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.
Re:The Source History of Cat by privong on Monday November 12, 2018 @09:15PM (#18437881)
For what it's worth, on a not-too-old Mac:

  $ uname -v
  Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64
  $ grep --version
  grep (BSD grep) 2.5.1-FreeBSD
I don't have historical information, but that's at least consistent.