|
What is 'awk'?awk is a scripting/pattern matching language that originated in the UNIX operating system. It is very good at certain data processing tasks. The idea is that every line of a file (or stream) is compared to a set of patterns. If there is a match against a pattern, then the corresponding processing action is performed on that line of data. The program might transform the input and print to the output stream directly, or it might work with variables and print out an aggregated result at the end.
awk, like the rest of the Unix command set, is somewhat idiosyncratic and takes some getting used to. However, if you have already worked with regular expressions, you are most of the way there. These days, many would choose to use a more general programming approach such as PERL or Python, but awk is still a powerful tool to have available.
If you are a Windows user, you can use GNU's version of awk, called gawk, under cygwin
Other Terms
|
|