Syntax awk options > ' Program ' Input-File1 Input-File2 ... awk -f PROGRAM-FILE options > Input-File1 Input-File2 ... If no Input-File is specified then `awk' applies the Program to "standard input", (piped output of some other command or the terminal. Typed input will continue until end-of-file (typing `Control-d') Basic functions The basic function of awk is to search files for lines (or other units of text) that contain a pattern. When a line matches, awk performs a specific action on that line. The Program statement that tells `awk' what to do; consists of a series of "rules". Each rule specifies one pattern to search for, and one action to perform when that pattern is found. For ease of reading, each line in an `awk' program is normally a separate Program statement , like this: pattern { action } pattern { action } ... e.g. Display lines from my_file containing the string "123" or "ab...
Get tips on any operations or functions done on or by the linux operating systems, debian, ubuntu, fedora etc..