Skip to content

Instantly share code, notes, and snippets.

@sebastianwagner
Created June 26, 2013 07:39
Show Gist options
  • Save sebastianwagner/5865484 to your computer and use it in GitHub Desktop.
Save sebastianwagner/5865484 to your computer and use it in GitHub Desktop.
Generate list of numbers with zero padding in front. Adjust size of padding according to length of maximum given.
export Y=100; Z=${#Y}; for x in $(seq 1 $Y); do echo $(printf "%0"$Z"d" $x); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment