Skip to content

Instantly share code, notes, and snippets.

@tgck
Created April 20, 2013 20:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgck/5427200 to your computer and use it in GitHub Desktop.
Save tgck/5427200 to your computer and use it in GitHub Desktop.
ブレース展開に変数を使う(実行例). eval を使えば解決!
#!/bin/bash
# ブレース展開に変数を使う(実行例)
#
$ target=10
$
$ echo {1..$target}
{1..10}
$
$ eval echo {1..$target}
1 2 3 4 5 6 7 8 9 10
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment