Quote Originally Posted by jerome bettis View Post
i know it can be done, but look how much more work that was. thanks for helping me prove my point so well
that was just a poor example.. You can see geirha's example. (@geirha's thanks,been dormant for a while and forgot about FILENAME). Sorry what point are you proving again?

bash/sed/awk are all worth learning.
when it comes to parsing files, bash (to call awk ) and awk is all you need. The rest of the tools that can read files -> wc, tr, sed, grep, cat, nl, head, etc one can chuck it in his toolbox and never use it. But for some, like tail, is sometimes indispensable due to its purpose. (although you can also use awk to simulate "tail")