Thursday, May 10, 2012
12:42 PM

What is the Purpose of Awk?

Awk is a stream editor, similar to Sed. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). While in some ways similar to an editor which permits scripted edits (such as ed), Awk works by making only one pass over the input(s), and is consequently more efficient. But it is Awk’s ability to filter text in a pipeline which particularly distinguishes it from other types of editors.

Awk may be started with complex scripts containing rules to transform input streams. This article is dedicated to one-line scripts, that are utilized most often in shell scripts to filter and transform data.

Basic Usage of Awk
Awk works on input streams or simple text files. You just have to feed Awk with text and you have to define what actions have to be performed. The output stream of Awk will contain the filtered and transformed data.

0 comments:

Post a Comment