Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seq: missing -f option #2616

Closed
jfinkels opened this issue Aug 29, 2021 · 2 comments
Closed

seq: missing -f option #2616

jfinkels opened this issue Aug 29, 2021 · 2 comments
Labels

Comments

@jfinkels
Copy link
Collaborator

seq is missing the -f option:

       -f, --format=FORMAT
              use printf style floating-point FORMAT

For example,

$ seq -f "%.3f" 0 .1 1
0.000
0.100
0.200
0.300
0.400
0.500
0.600
0.700
0.800
0.900
1.000
@jfinkels
Copy link
Collaborator Author

This could use the code that already exists in printf. I guess that code would need to be moved to uucore so that it could be used by both printf and seq (and others, if any other program requires printf-style string formatting).

jfinkels added a commit to jfinkels/coreutils that referenced this issue Jan 26, 2022
Add support for the `-f FORMAT` option to `seq`. This option instructs
the program to render each value in the generated sequence using a
given `printf`-style floating point format. For example,

    $ seq -f %.2f 0.0 0.1 0.5
    0.00
    0.10
    0.20
    0.30
    0.40
    0.50

Fixes issue uutils#2616.
@jfinkels
Copy link
Collaborator Author

Fixed by #2918.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants