[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf %n is not documented

From: Chet Ramey
Subject: Re: printf %n is not documented
Date: Fri, 23 Dec 2022 18:53:08 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

On 12/23/22 7:24 AM, Emanuele Torre wrote:
About two months ago, I discovered, reading the bash source code for
printf, the %n format specifier.

What it does is assign to the variable specified as its argument, the
number of bytes that have been written so far (similarly to the C

It's a standard part of printf(3), and is standardized by POSIX. Bash
doesn't document the standard conversion specifiers.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]