From f6b673d5434959797423eb64cfaa694f3e812b21 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 29 Jan 2000 10:09:40 +0000 Subject: patch from Bruno demonstrating how to use seq to produce integer output or output in non-decimal --- doc/sh-utils.texi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc') 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 -- cgit v1.2.3-54-g00ecf