[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can -f of seq take an integer format?
From: |
Assaf Gordon |
Subject: |
Re: Can -f of seq take an integer format? |
Date: |
Thu, 1 Aug 2019 14:35:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Hello,
On 2019-08-01 2:07 p.m., Peng Yu wrote:
I only find %.0f to print integers. But it is just a float with no
digits after the point. Is there a real integer format in seq? Thanks.
Please read the manual, or at least the "--help" screen:
$ seq --help
[...]
-f, --format=FORMAT use printf style floating-point FORMAT
[...]
FORMAT must be suitable for printing one argument of type 'double';
it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed
point decimal numbers with maximum precision PREC, and to %g
otherwise.
This makes it clear that the format must be "%f" or "%g" (and must be
compatible with a "double" type).
So there is no current support for integer format directly.
regards,
- assaf