What is awk, and how do I use it?
At Indiana University, you can use awk on all the
Unix-based central systems. Although awk is a complete
pattern scanning and processing language, it is most commonly used as
a Unix command-line filter to reformat the output of other
commands. For example, to print only the second and sixth fields of
the date command (the month and year) with a space
separating them, at the Unix prompt, you would enter:
To read the online manual (the man page) for awk,
at the Unix prompt, enter:
Also, consult the newsgroup comp.lang.awk.
gawk is a version of awk produced by the
GNU Project. At IU, it is available on Quarry in
the /usr/bin/gawk directory, and on Libra in
the /opt/freeware/bin/gawk directory.
For information about gawk, at the Unix prompt, enter:
Also see:
- In Unix, what do some obscurely named commands stand for?
- What do some common Unix file extensions mean?
- What is Perl, and where can I get more information about it?
- In Unix, what is the man command, and how do I use it to read manual pages?
- For Unix, where can I find GNU software packages?
Last modified on April 29, 2008.






