Re: Inquiry:How to compare two files but not in line-by-line basis?

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



> mark wrote:
>> Les Mikesell wrote:
>>> Awk is just too weird for normal people.  I wouldn't even suggest
>>> reading that manual.  If you can't do what you want with regexps and a
>>> pipeline of simpler programs, you might as well use perl.
>>
>> <Looks around, yeah, this *is* a list for sysadmins of Linux....>
>
Reading the response, I realize you were serious, not being funny, as I
thought.

> Who have probably almost all started something in awk and ended up either
> needing a pipeline of other programs or switching to perl.  If your
> machine is powerful enough to run perl (and I can't imagine one that
> isn't in this century) you might as well use it because it does anything
> awk can do and more.

I started seeing references to perl in the early nineties, so it ran on
those machines. Also, I remember running into Larry Wall, and responding
to him very irritatedly, around '93 or '94, when he showed up on
comp.language.awk, and told someone the answer to his question was to go
to perl. Now, I really like perl, but for some things - like were I want
to do nothing but process one or maybe two text files at a time, and want
to loop through the whole thing, it's simpler.

> awk is almost as complicated to learn but can't do as much and is harder

"Almost as complicated to learn"? I had no trouble learning it around, oh,
'91. But then, at that point I'd been programming professionally for more
than 10 years. If you know perl, and you can program shell, and if you
know any other language (unless *all* you know is Objectionably Oriented
languages), there's minimal ramp-up time.
<snip>
> Maybe it made sense on computers of the 1970's, or before perl was
> available.

awk standardized pretty much, according to what I've read - possibly man
pages on Sun 3's or Irix - around '83. perl was *NOT* part of std. distros
until the end of the nineties. And they do a lot of the same thing. To
some degree, it's a matter of preferences, and to put down awk as "almost
as complicated as perl to learn" does not impress me.
<snip>
> Shell commands are just what you'd type so you have to know it anyway so
> there is nothing special about making a program out of it. Other than
> grep using regexps the man pages for those programs are probably

And regexes have always been considered a black art - there's always the
"how many escapes do you need for this", esp. if it's in a script.

> literally a page. No one is going to understand awk or perl after reading
> a page. Personally I'd probably

So, you don't actually know any programming, and it sounds like you want
to learn as little as possible, even though doing so will make your life
easier upstream.
<snip>
Try it - you might find that to be the case.

Oh, and if you're on this list, then the mundane world doesn't consider
you "normal", anyway; you're a geek, or a wonk, or a
fill-in-the-stereotype-put-down-name, not a "k3wl dud3".

        mark

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux