Generate a sequence of numbers, zero-padded

echo {01..10}

March 1, 2015Elkku

Explanation

This example will print:

01 02 03 04 05 06 07 08 09 10

Limitations

The zero-padding feature works only in Bash >=4.

Related one-liners

Generate a sequence of numbers using a simple for loop

for ((i=1; i<=10; ++i)); do echo $i; done

November 4, 2014bashoneliners