GNU shell utilities - 13. Numeric operations

Go to the first, previous, next, last section, table of contents.

# 13. Numeric operations

These programs do numerically-related operations.

## 13.1 `factor`: Print prime factors

`factor` prints prime factors. Synopses:

    factor [number]...
    factor option

If no number is specified on the command line, `factor` reads numbers from standard input, delimited by newlines, tabs, or spaces.

The only options are ``--help'` and ``--version'`. See section 2. Common options.

## 13.2 `seq`: Print numeric sequences

`seq` prints a sequence of numbers to standard output. Synopses:

    seq [option]... [first [step]] last...

`seq` prints the numbers from first to last by step. By default, first and step are both 1, and each number is printed on its own line. All numbers can be reals, not just integers.

The program accepts the following options. Also see section 2. Common options.

``-f format'`
``--format=format'`
  Print all numbers using format; default ``%g'`. format must contain exactly one of the standarding float output formats ``%e'`, ``%f'`, or ``%g'`.
``-s string'`
``--separator=string'`
  Separate numbers with string; default is a newline. The output always terminates with a newline.
``-w'`
``--equal-width'`
  Print all numbers with the same width, by padding with leading zeroes. (To have other kinds of padding, use ``--format'`).

Go to the first, previous, next, last section, table of contents.