---
name: "plan9-seq"
section: "1"
platform: "linux"
package: "9base"
version: "1:6-5"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/plan9-seq"
---

# plan9-seq(1)

print sequences of numbers

## NAME

seq - print sequences of numbers

## SYNOPSIS

**seq** \[ **-w** \] \[ **-f***format* \] \[ *first* \[ *incr* \] \] *last*

## DESCRIPTION

*Seq* prints a sequence of numbers, one per line, from *first* (default 1) to as near  *last* as possible, in increments of *incr* (default 1). The loop is:

```
  for(val = min; val <= max; val += incr) print val;
```

The numbers are interpreted as floating point.

Normally integer values are printed as decimal integers. The options are

- **-f***format*

  Use the  *print*(3)-style *format* *print* for printing each (floating point) number. The default is

- **-w**

  Equalize the widths of all numbers by padding with leading zeros as necessary. Not effective with option **-f**, nor with numbers in exponential notation.

## EXAMPLES

- seq 0 .05 .1

  Print **0 0.05 0.1** (on separate lines).

- seq -w 0 .05 .1

  Print **0.00 0.05 0.10**.

## SOURCE

**/src/cmd/seq.c**

## BUGS

Option **-w** always surveys every value in advance. Thus seq -w 1000000000 is a painful way to get an \`infinite' sequence.
