Shaun Abram
Technology and Leadership Blog
awk
I think of awk as a tool for searching, manipulating and reporting on text files, but it is in fact an entire programming language. Its basic function is to search files for lines that contain certain patterns, and perform specified actions on that line.
The name awk comes simply from the initials of its designers Aho, Weinberger and Kernighan.
The basic format of an awk command is:
awk pattern { action } file
Every line in ‘file’ matching the ‘pattern’ will have the ‘action’ performed. Either the pattern or action are optional, but not both.
No pattern means every line is actioned.
No action defaults to print.