[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
13.2 Reinventing Wheels for Fun and Profit
This section presents a number of POSIX utilities implemented in
awk
. Reinventing these programs in awk
is often enjoyable,
because the algorithms can be very clearly expressed, and the code is usually
very concise and simple. This is true because awk
does so much for you.
It should be noted that these programs are not necessarily intended to
replace the installed versions on your system.
Nor may all of these programs be fully compliant with the most recent
POSIX standard. This is not a problem; their
purpose is to illustrate awk
language programming for “real world”
tasks.
The programs are presented in alphabetical order.
13.2.1 Cutting out Fields and Columns | The cut utility.
| |
13.2.2 Searching for Regular Expressions in Files | The egrep utility.
| |
13.2.3 Printing out User Information | The id utility.
| |
13.2.4 Splitting a Large File into Pieces | The split utility.
| |
13.2.5 Duplicating Output into Multiple Files | The tee utility.
| |
13.2.6 Printing Nonduplicated Lines of Text | The uniq utility.
| |
13.2.7 Counting Things | The wc utility.
|
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |