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?
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")bash/sed/awk are all worth learning.
Bookmarks