Linux.com

record and field separators are redefinable

Posted by: Anonymous Coward on February 01, 2006 12:24 AM
Once you learn to use regexes for field and record separators, you can do many tasks with awk one-liners that would require far more processing power and programming skill using *any* other language.

As a (nearly always correct) rule of thumb: if there is only one input file and one output stream, use awk or sed. If there are multiple non-sequential inputs and/or outputs use something else (perl or python for rapid development, or a compiled language for fast efficient execution)

#

Return to CLI Magic: Learn to talk awk