AWK

AWK is a text processing tool that's very domain-specific (special processing for start and end, regular expressions, basic math to count things, etc.) but more general purpose than what you might have with stricter regular expression tools like grep.

It's handy to use awk to generate commands that can be piped to xargs for example.

cut

You can sometimes get away with using cut instead.

cut -f 2 prints the second field of a tab-delimited input.

If you have space-separated fields, each space is a delimiter for tools like cut, but awk will deal with "chunk of spaces" asa delimiter instead.

Home