User Tools

Site Tools


awk:awk

This is an old revision of the document!


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.


Introduction to AWK

AWK Basics


Delete all blank lines from a file

Delete both leading and trailing whitespaces from each line

Delete consecutive duplicate lines

Delete leading whitespace and tabs from the beginning of each line

Delete trailing whitespace and tabs from the end of each line

Delete non-consecutive duplicate lines

Number all lines in a file

Reverse order of fields in each line

Reverse order of lines

awk/awk.1600876991.txt.gz · Last modified: 2020/09/23 16:03 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki