On Tue, Mar 21, 2017 at 10:54 PM, Jamie Landeg-Jones> I realise there are advantages of GNUgrep and also advantages of BSDgrep, > hence why they are currently both available (and thanks for your work on > getting bsd grep up to parity) but I don't understand why on the default install, > xzgrep.. etc. are no longer linked to bsdgrep, unless there are problems > with them? (I notice the 32K limit bug has been fixed) - but then if there > were problems, they wouldn;t be linked whatever the configured system "grep"Ah, I see what you mean. I've no idea on the history here, but I believe the idea is that if I invoke one of these other links (zgrep, egrep, ...) I'm expecting it to be actually be grep(1) based purely on the name, and I don't consider bsdgrep(1) to be installed for anything but a courtesy. For grep(1) to be GNU grep while xzgrep to secretly be a link to BSD grep would be quite surprising to me as a user/admin, especially since there are very real output and argument differences between the two. This argument can be furthered by imagining the awkwardness that would come from a system where the fairly standard *grep links are a mix between BSD grep and GNU grep.> Hope this makes sense, I should have been asleep hours ago! > > Cheers, JamieMakes good sense, =) Thanks, Kyle Evans
Jamie Landeg-Jones
2017-Mar-22 12:41 UTC
Freebsd 11 - /usr/bin missing [xl]zgrep/zegrep/zfgrep
Kyle Evans <kevans91 at ksu.edu> wrote:> Ah, I see what you mean. I've no idea on the history here, but I > believe the idea is that if I invoke one of these other links (zgrep, > egrep, ...) I'm expecting it to be actually be grep(1) based purely on > the name, and I don't consider bsdgrep(1) to be installed for anything > but a courtesy. > > For grep(1) to be GNU grep while xzgrep to secretly be a link to BSD > grep would be quite surprising to me as a user/admin, especially since > there are very real output and argument differences between the two. > This argument can be furthered by imagining the awkwardness that would > come from a system where the fairly standard *grep links are a mix > between BSD grep and GNU grep.Ahhh. Yes, that does make good sense, now you mention it. Maybe they should be installed as bsdxzgrep ... :-) The thing is, though, it *did* used to do this, and now it doesn't, which isn't very POLA, and the revision log makes no mention of it (it's an update to do with META mode) and I can't find any information about it. I'd have least expected /usr/src/UPDATING to mention when 6 utilities are effectively removed from /usr/bin! Hence why I was wondering if this change was actually intentional - at least now I know a good reason to do this (what you mentioned above) so cheers for that, and the fast responses.. Your first response came in so quickly, I first thought it was a bounce message! Cheers, Jamie P.S. Nice to see someone on this list still remembers mail quoting etiquette ;-)
George Mitchell
2017-Mar-22 13:32 UTC
Freebsd 11 - /usr/bin missing [xl]zgrep/zegrep/zfgrep
On 03/22/17 00:07, Kyle Evans wrote:> [...] > For grep(1) to be GNU grep while xzgrep to secretly be a link to BSD > grep would be quite surprising to me as a user/admin, especially since > there are very real output and argument differences between the two. > [...]It would not surprise me. Knowing, to begin with, that GNU grep does not support uncompressing its input, I would *never* expect bzgrep (etc.) to link to GNU grep. -- George -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20170322/b236a8ba/attachment.sig>