GNU Info

Info Node: (gawk.info)Printing

(gawk.info)Printing


Next: Expressions Prev: Reading Files Up: Top
Enter node , (file) or (file)node

Printing Output
***************

   One of the most common programming actions is to "print" or output,
some or all of the input.  Use the `print' statement for simple output,
and the `printf' statement for fancier formatting.  The `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, Note: Output Separators, and Note:
Controlling Numeric Output with `print'.)  For that, you need the
`printf' statement (Note: Using `printf' Statements for Fancier
Printing.).

   Besides basic and formatted printing, this major node 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.

Print
The `print' statement.
Print Examples
Simple examples of `print' statements.
Output Separators
The output separators and how to change them.
OFMT
Controlling Numeric Output With `print'.
Printf
The `printf' statement.
Redirection
How to redirect output to multiple files and
pipes.
Special Files
File name interpretation in `gawk'.
`gawk' allows access to inherited file descriptors.
Close Files And Pipes
Closing Input and Output Files and Pipes.

automatically generated by info2www version 1.2.2.9