seq

Output a sequence of numbers to stdout. More information: <https://www.gnu.org/software/coreutils/seq>.

Install

All systems
curl cmd.cat/seq.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add coreutils
Arch Arch Linux
pacman -S coreutils
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
Windows (WSL2)
sudo apt-get update sudo apt-get install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/seq seq powered by Commando

Output a sequence of numbers to stdout. More information: <https://www.gnu.org/software/coreutils/seq>.

  • Sequence from 1 to 10:
    seq 10
  • Every 3rd number from 5 to 20:
    seq 5 3 20
  • Separate the output with a space instead of a newline:
    seq -s " " 5 3 20
  • Format output width to a minimum of 4 digits padding with zeros as necessary:
    seq -f "%04g" 5 3 20

© tl;dr; authors and contributors