Tag Archives: awk

Sometimes it is useful to keep the header of an output of some command while grepping the same output for something else. In the example below, the column information is absent:

A solution without regular expressions

There are many ways for selecting columns in a delimited text. The easiest ones require GNU awk, cut and Perl. Let's consider the following file: