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
counterpart).
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 c...@case.edu http://tiswww.cwru.edu/~chet/