gawk: Printing
5 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
DONTPRINTYET so on. (For the exceptions, Output Separators and *noteDONTPRINTYET so on. (For the exceptions, Output Separators and
OFMT.) For printing with specifications, you need the 'printf'
statement (Printf).
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.
Menu