Skip to content

Instantly share code, notes, and snippets.

@vbarbarosh
Last active March 28, 2019 21:08
Show Gist options
  • Select an option

  • Save vbarbarosh/fb6d8b3637b8d65ad23ff9dfb3d2adf1 to your computer and use it in GitHub Desktop.

Select an option

Save vbarbarosh/fb6d8b3637b8d65ad23ff9dfb3d2adf1 to your computer and use it in GitHub Desktop.
shell_bash_range – Generate range of numbers in bash https://codescreens.com
#!/bin/bash
# http://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -o nounset -o errexit -o pipefail
# https://www.percona.com/blog/2017/10/01/one-million-tables-mysql-8-0/
# 1 2 3 4 5 6 7 8 9 10
echo {1..10}
# 1 3 5 7 9
echo {1..10..2}
# a b c d e f g h i j k l m n o p q r s t u v w x y z
echo {a..z}
# a1 a2 a3 a4 a5 b1 b2 b3 b4 b5
echo {a..b}{1..5}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment