Printf utility
Overview
The Single UNIX Specification, Version 2
© 1997 The Open Group
Name
printf - write formatted output
Synopsis
printf format [argument...]
Description
The printf utility will write formatted operands to the standard output. The argument operands will be formatted under control of the format operand.
Options
None.
Operands
- format: A string describing the format to use to write the remaining operands; see the extended description section.
- argument: The strings to be written to standard output, under the control of format; see the extended description section.
Standard Input
Not used.
Input Files
None.
Environment Variables
The following environment variables affect the execution of printf:
- LANG: Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
- LC_ALL: If set to a non-empty string value, override the values of all the other internationalisation variables.
- LC_CTYPE: Determine the locale for the interpretation of sequences of bytes of text data as characters (e.g., single- vs. multi-byte characters in arguments).
- LC_MESSAGES: Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
- LC_NUMERIC: Determine the locale for numeric formatting. It will affect the format of numbers written using the e, E, f, g, and G conversion characters (if supported).
- NLSPATH: Determine the location of message catalogues for the processing of LC_MESSAGES.
Asynchronous Events
Default.
Standard Output
See the extended description section.
Standard Error
Used only for diagnostic messages.
Output Files
None.
Extended Description
The format operand will be used as the format string described in the specification, XBD File, with the following exceptions:
- Format Notation: A character in the format string, in any context other than a flag of a conversion specification, will be treated as an ordinary character that is copied to the output.
- In addition to the escape sequences shown in the specification, XBD File Format (\
\, \\a, \\b, \\f, \\n, \\r, \\t, \\v), where \\dddis a one-, two- or three-digit octal number, will be written as a byte with the numeric value specified by the octal number. - The implementation will not precede or follow output from the d or u conversion specifications with blank characters not specified by the format operand.
-
Sistemi operativi - Syscall msgget
-
Sistemi operativi - Syscall msgrcv
-
Sistemi operativi - Syscall pthread_cond_signal
-
Sistemi operativi - Syscall pthread_exit