summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-01-29 10:09:40 +0000
committerJim Meyering <jim@meyering.net>2000-01-29 10:09:40 +0000
commitf6b673d5434959797423eb64cfaa694f3e812b21 (patch)
treef528fe86afa85416e0222ea5d8ba3336b442ad2c
parentbb84498a89eb2aefd4ccec0ee6f38e8f45616b87 (diff)
downloadcoreutils-f6b673d5434959797423eb64cfaa694f3e812b21.tar.xz
patch from Bruno demonstrating how to use seq to produce integer
output or output in non-decimal
-rw-r--r--doc/sh-utils.texi12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/sh-utils.texi b/doc/sh-utils.texi
index aa2635383..66e9e358b 100644
--- a/doc/sh-utils.texi
+++ b/doc/sh-utils.texi
@@ -3143,8 +3143,8 @@ The program accepts the following options. Also see @ref{Common options}.
@opindex --format=@var{format}
@cindex formatting of numbers in @code{seq}
Print all numbers using @var{format}; default @samp{%g}.
-@var{format} must contain exactly one of the standarding float output
-formats @samp{%e}, @samp{%f}, or @samp{%g}.
+@var{format} must contain exactly one of the standarding floating point
+output formats @samp{%e}, @samp{%f}, or @samp{%g}.
@item -s @var{string}
@itemx --separator=@var{string}
@@ -3159,6 +3159,14 @@ Print all numbers with the same width, by padding with leading zeroes.
@end table
+Note: The @var{format} string can only produce decimal numbers. If you
+want decimal numbers without exponent and without decimal point to be
+output, use the format @samp{%1.f}. If you want hexadecimal or octal
+output, use the command
+@code{printf @var{format}'\n' `seq -f %1.f @var{first} @var{step} @var{last}`}
+or the command
+@code{seq -f %1.f @var{first} @var{step} @var{last} | xargs -n 1000 printf @var{format}'\n'}
+with @samp{%x} or @samp{%o} as @var{format} string.
@node Index
@unnumbered Index