On Jun 6, 9:40 am, "Ed Morton" <
mortons...@gmail.com> wrote:
>
http://groups.google.com/group/comp.unix.shell/browse_thread/thread/d...
> Seems kinda wordy compared to:
> awk '$0 != ++expected{print expected; exit}'
Hmmm. I anticipated this comment, but frankly, I thought
that it had been sufficiently hashed out several years ago....
Wordy? Well, yes and no. Reminds me of the amusing
programmer humor that purports to program "Hello World"
as a newby, intermediate, graduate student, and professional
programmer. As the latter, his "Hello World" is a 200-line
C++ class....
Scriptarians will presumably preternaturally elevate the
criterion of _character count_ to quantize elegance, ur,
wordiness. Well, suum cuique pulchrum est....
(I would have myself made an argument around the criterion
of elegance, not wordiness).
And inasmuch as the "wordiness" is very much there, but
well hidden by use of the abstraction of the VHLL awk
interpreter... _and_ my code is two orders of magnitude more
efficient for small data samples, my solution cannot not be
no not-small exercise in not-wordiness, now can it?
(Or I could have just been snarky, and have said, "Take it to
comp.lang.awk!" -- but I wouldn't do that: the one-liner _is_
kinda nice, but then I knew that, my provided solution coming
after having seen that one).
=Brian