Re: Bash commands: maybe they want to drive us crazy?
From: Nick Landsberg (hukolau_at_worldnet.att.net)
Date: 06/30/04
- Next message: Floyd L. Davidson: "Re: Bash commands: maybe they want to drive us crazy?"
- Previous message: nobody_at_nowhere.com: "Re: Bash commands: maybe they want to drive us crazy?"
- In reply to: matthieu imbert: "Re: Bash commands: maybe they want to drive us crazy?"
- Next in thread: Keith Keller: "Re: Bash commands: maybe they want to drive us crazy?"
- Reply: Keith Keller: "Re: Bash commands: maybe they want to drive us crazy?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jun 2004 21:15:41 GMT
matthieu imbert wrote:
> GP wrote:
>
>> Is there any obscure reason, which I can't fathom, as to why commands
>> layout can't be standardised or are they really trying to drive us
>> crazy by going each their own anarchic chic chic way?
>
>
> hi
> yes there is a reason:
> commands don't always have a consistent (between them) syntax due to
> historical reasons. grep and find for example are very old commands,
> whose first versions where probably written at a time when there was no
> guidelines nor tradition for command syntax.
> now one could ask: why not change and make all command options
> consistent ? it's not possible because these commands are now
> "traditionnal", everyone has learned these as they are, and it would
> break this well established tradition and force everyone to learn all
> from scratch again. Also there's a huge number of scripts that would be
> broken.
> so as annoying as it may seem, you have to live with that... But it is
> not so much work: of the huge number of commands, you only need to know
> a small subset to start working efficiently, and for this subset, you
> usually not need to know all options, only the most important one.
> best regards
I can sympathize with the Original Poster [OP] ...
the syntax of "find" (without all the bells and whistles)
could be summarized as:
find [ where ] [ what-to-do-with-it ]
while the syntax of grep (and a host of other stuff)
could be summarized as:
grep [ for-what ] [ where ]
As you say, these are ancient an venerable commands which have
been around since at least 1975 and a whole boatload of
existing scripts would break if either of them were changed.
It doesn't make it any easier for the new user to grok
command line syntax, tho. Consider it sort-of like
Engish grammar... there are way too many special cases
to try to make sense of it as a whole :)
NPL
P.S. - the history of grep as I know it is that it was
shorthand for what was available in the old "ed" (line
editor) program, specifially "g/RE/p" where RE
stands for "regular expression." Find was, as far
as I know, an independent development.
-- "It is impossible to make anything foolproof because fools are so ingenious" - A. Bloch
- Next message: Floyd L. Davidson: "Re: Bash commands: maybe they want to drive us crazy?"
- Previous message: nobody_at_nowhere.com: "Re: Bash commands: maybe they want to drive us crazy?"
- In reply to: matthieu imbert: "Re: Bash commands: maybe they want to drive us crazy?"
- Next in thread: Keith Keller: "Re: Bash commands: maybe they want to drive us crazy?"
- Reply: Keith Keller: "Re: Bash commands: maybe they want to drive us crazy?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|