Well, sure... it would have reversed the lines, but still printed them all
in his initial revision (as in, identical to Jeremiah's).  If you tac the
file into the awk script I've posted, it will behave like the second version
of the OP bash script.  The only difference is that the awk script is an
order of magnitude faster; and speed appeared to be the issue.

On Fri, Aug 21, 2009 at 8:26 AM, Ryan Graham <[email protected]> wrote:

>
> On Fri, Aug 21, 2009 at 4:09 AM, Daniel Eggleston<[email protected]> wrote:
> > Your original code would have behaved identically to jeremiah's code. awk
> is
> > uniquely suited to this sort of line-by-line programmatic parsing:
>
> The original code used tac, as in a reverse order concatenation, to
> get the bottom entries first. I think that's where the confusion came
> in.
>
> ~Ryan
> --
> http://rmgraham.blogspot.com
> http://twitter.com/rmgraham
>
> >
>


-- 

          Daniel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---

Reply via email to