[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Grep's "ignore binry files" option [was: Free TCP/IP port numbers?]



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Oct 01, 2017 at 11:36:40AM -0400, Gene Heskett wrote:

> >    --binary-files=TYPE

[...]

> And that, while lots more typing, seems to duplicate the -I option.

It does; actually, --binary-files=foo gives you some more control, depending
on <foo>, whereas -I abbreviates one commonly used case, namely the
"without-match" case.

This pattern (long vs. short options; sometimes long options offer more
knobs) is pervasive in the GNU utilities world, and has a historical
reason.

In the good ol' times, there were a few proprietary Unixes (AT&T, Sun's
Xenix, what not), and they all came with their own set of utilities,
with mixed quality and slightly incompatible options.

The GNU toolset was installable on most unices and tried, as far as
possible, to be downward-compatible to all of them (plus often being
of higher quality: less bugs, less limitations. For one anecdote, the
system's awk had a line length limit of 1K and silently (!) truncated
longer lines; GNU awk just digested any line length you threw at it).

Long story short, any sysadmin worth their salt ended up installing
the GNU utils.

This explains a bit that thicket of options you see nowadays, often
with long and short variants (the systematized double dash for long,
and single dash for short options is already GNU's attempt at taming
the chaos: you'll see many vestigial variants, like the single-dash
longs of find(1) et al).

Then Linux came and most of the user space was there, waiting...
(the success of the free BSDs and Linux wouldn't have been the same
otherwise).

> > My English module masters this (and it is pretty old too. Moreover, it
> > was a cheap second-hand one, labelled "for foreigners" ;-)
> >
> Chuckle... It is working very well, too. And I thank you for taking the 
> trouble to learn a language you didn't often hear growing up. Had I 
> stayed in school, the language class choices then were Latin and French. 
> But TBT, I didn't stick around, I had an allergy problem which turned 
> out to be milk when it was finally found, and my algebra teacher was 
> more interested in off-color standup comedy than in teaching algebra, so 
> in 1948 there was a job market for tv repairmen, so I quit and went to 
> work. Fixing these new-fangled things they called tv sets.  I was 14. So 
> I was a geek before the word was invented. :) But now I'm an just old 
> geezer that can regale you with stories about some of the BTDT's I've 
> done. :)  And I've learned something useful today, thanks to you and 
> Reco.

Hey, thank you for taking my snark in such a sporty way :-)

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlnREBEACgkQBcgs9XrR2kZL2gCfbrbqDfNenulLh4/YMNLboUlp
FZ0AnAo1yiIXTdgMkRCZyVkZ2Uqfr4rt
=VMa9
-----END PGP SIGNATURE-----


Reply to: