diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2022-05-14 23:32:19 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2022-05-14 23:32:19 +0200 |
commit | d4d203488826181aa4eb360ce57de138417ba680 (patch) | |
tree | 5f2939130b24381b6d8b11eec7573732eb52317a /Doc/help/printf | |
parent | 9529af723604dfe1c8152db11e1d216621c898d5 (diff) | |
parent | 73d317384c9225e46d66444f93b46f0fbe7084ef (diff) | |
download | zsh-d4d203488826181aa4eb360ce57de138417ba680.tar.gz zsh-d4d203488826181aa4eb360ce57de138417ba680.zip |
New upstream version 5.9
Diffstat (limited to 'Doc/help/printf')
-rw-r--r-- | Doc/help/printf | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Doc/help/printf b/Doc/help/printf index e18ca3ea4..ba097a5ee 100644 --- a/Doc/help/printf +++ b/Doc/help/printf @@ -1,35 +1,35 @@ printf [ -v name ] format [ arg ... ] - Print the arguments according to the format specification. For- - matting rules are the same as used in C. The same escape se- - quences as for echo are recognised in the format. All C conver- + Print the arguments according to the format specification. For- + matting rules are the same as used in C. The same escape se- + quences as for echo are recognised in the format. All C conver- sion specifications ending in one of csdiouxXeEfgGn are handled. - In addition to this, `%b' can be used instead of `%s' to cause - escape sequences in the argument to be recognised and `%q' can + In addition to this, `%b' can be used instead of `%s' to cause + escape sequences in the argument to be recognised and `%q' can be used to quote the argument in such a way that allows it to be - reused as shell input. With the numeric format specifiers, if - the corresponding argument starts with a quote character, the - numeric value of the following character is used as the number - to print; otherwise the argument is evaluated as an arithmetic - expression. See the section `Arithmetic Evaluation' in zsh- - misc(1) for a description of arithmetic expressions. With `%n', - the corresponding argument is taken as an identifier which is + reused as shell input. With the numeric format specifiers, if + the corresponding argument starts with a quote character, the + numeric value of the following character is used as the number + to print; otherwise the argument is evaluated as an arithmetic + expression. See the section `Arithmetic Evaluation' in zsh- + misc(1) for a description of arithmetic expressions. With `%n', + the corresponding argument is taken as an identifier which is created as an integer parameter. Normally, conversion specifications are applied to each argument - in order but they can explicitly specify the nth argument is to - be used by replacing `%' by `%n$' and `*' by `*n$'. It is rec- - ommended that you do not mix references of this explicit style - with the normal style and the handling of such mixed styles may + in order but they can explicitly specify the nth argument is to + be used by replacing `%' by `%n$' and `*' by `*n$'. It is rec- + ommended that you do not mix references of this explicit style + with the normal style and the handling of such mixed styles may be subject to future change. - If arguments remain unused after formatting, the format string + If arguments remain unused after formatting, the format string is reused until all arguments have been consumed. With the print - builtin, this can be suppressed by using the -r option. If more - arguments are required by the format than have been specified, - the behaviour is as if zero or an empty string had been speci- + builtin, this can be suppressed by using the -r option. If more + arguments are required by the format than have been specified, + the behaviour is as if zero or an empty string had been speci- fied as the argument. The -v option causes the output to be stored as the value of the - parameter name, instead of printed. If name is an array and the - format string is reused when consuming arguments then one array + parameter name, instead of printed. If name is an array and the + format string is reused when consuming arguments then one array element will be used for each use of the format string. |