The GNU Awk User's Guide
5. Printing Output
One of the most common programming actions is to print, or output,
some or all of the input. Use the
for simple output, and the
for fancier formatting.
print statement is not limited when
computing which values to print. However, with two exceptions,
you cannot specify how to print them--how many
columns, whether to use exponential notation or not, and so on.
(For the exceptions, see section 5.3 Output Separators, and
Controlling Numeric Output with
For printing with specifications, you need the
(see section Using
printf Statements for Fancier Printing).
Besides basic and formatted printing, this chapter
also covers I/O redirections to files and pipes, introduces
the special file names that
gawk processes internally,
and discusses the
close built-in function.
gawk allows access to inherited file