Re: [Nolug] Lists in bash

From: Andrew S. Johnson <andy_at_asjohnson.com>
Date: Wed, 12 Feb 2003 21:38:05 -0600
Message-Id: <200302122138.05854.andy@asjohnson.com>

Try this:

$ seq --help
Usage: seq [OPTION]... LAST
  or: seq [OPTION]... FIRST LAST
  or: seq [OPTION]... FIRST INCREMENT LAST
Print numbers from FIRST to LAST, in steps of INCREMENT.

  -f, --format FORMAT use printf(3) style FORMAT (default: %g)
  -s, --separator STRING use STRING to separate numbers (default: \n)
  -w, --equal-width equalize width by padding with leading zeroes
      --help display this help and exit
      --version output version information and exit

If FIRST or INCREMENT is omitted, it defaults to 1.
FIRST, INCREMENT, and LAST are interpreted as floating point values.
INCREMENT should be positive if FIRST is smaller than LAST, and negative
otherwise. When given, the FORMAT argument must contain exactly one of
the printf-style, floating point output formats %e, %f, or %g.

Report bugs to <bug-sh-utils@gnu.org>.
$ seq 1 10
1
2
3
4
5
6
7
8
9
10

Not bash native, but it's still pretty easy.

Andy Johnson

___________________
Nolug mailing list
nolug@nolug.org
Received on 02/12/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST