Skip to content
gohacks.dev
Tooling

Sequence Generator

Generate sequences with bash brace expansion syntax: zero-padded number ranges, steps, letter ranges and lists, combined into hostnames, dates or file names.

Free · No sign-up · Your inputs stay in your browser

Input

Generate sequences with brace expansion

Output

Expanded

8 items

Follows bash's brace expansion, so the same pattern works unquoted on the command line: for h in web{01..04}; do ssh $h uptime; done, or mkdir -p app/{src,tests,docs}. Zero padding needs bash 4 or later; macOS ships bash 3.2, where {01..04} gives 1 2 3 4. Braces inside quotes are not expanded by the shell.

Runs in this browser. Nothing you paste is sent to a server.

Shell one-liners it saves

The same patterns work unquoted on the command line: mkdir -p app/{src,tests,docs}, for h in web{01..12}; do ssh $h uptime; done, or cp config.yml{,.bak} to make a backup copy. The brace expansion documentation describes the rules.

Version differences

Zero padding and the step form need bash 4 or later. macOS ships bash 3.2 as /bin/bash, where {01..04} gives 1 2 3 4 and the step is ignored; zsh supports both. Braces inside quotes are never expanded.

Share

Frequently asked questions

How do I generate a zero-padded sequence in bash?
Write the padding in the range: {01..12} gives 01 to 12 in bash 4+. On older shells, seq -w 1 12 does the same.
Can I step through a range?
Yes: {0..100..10} gives 0, 10, 20 and so on up to 100.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools