====== AWK ====== **AWK** is a scripting language used for manipulating data and generating reports. * It searches one or more files to see if they contain lines that matches with the specified patterns and then performs the associated actions. AWK supports variables, numeric functions, string functions, and logical operators. ---- [[AWK:About AWK|About AWK]] [[AWK:AWK Basics|AWK Basics]] ---- [[AWK:Delete all blank lines from a file|Delete all blank lines from a file]] [[AWK:Delete both leading and trailing whitespaces from each line|Delete both leading and trailing whitespaces from each line]] [[AWK:Delete consecutive duplicate lines|Delete consecutive duplicate lines]] [[AWK:Delete leading whitespace and tabs from the beginning of each line|Delete leading whitespace and tabs from the beginning of each line]] [[AWK:Delete trailing whitespace and tabs from the end of each line|Delete trailing whitespace and tabs from the end of each line]] [[AWK:Delete non-consecutive duplicate lines|Delete non-consecutive duplicate lines]] [[AWK:Display line after the matching string|Display line after the matching string]] [[AWK:Display line before the matching string|Display line before the matching string]] [[AWK:Display lines that contain a specific string|Display lines that contain a specific string]] [[AWK:Display lines that don't contain a specific string|Display lines that don't contain a specific string]] [[AWK:Display number of lines that contains specific string|Display number of lines that contains specific string]] [[AWK:Display specific fields only|Display specific fields only]] [[AWK:Find and replace a string|Find and replace a string]] [[AWK:Find Number of open connections per IP|Find Number of open connections per IP]] [[AWK:Number all lines in a file|Number all lines in a file]] [[AWK:Number only non-blank lines in files|Number only non-blank lines in files]] [[AWK:Reverse order of fields in each line|Reverse order of fields in each line]] [[AWK:Reverse order of lines|Reverse order of lines]]