Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

bash | ブレース展開

パンくず

入門bash
ブレース展開

概要

ブレース展開

内容

ブレース展開は所定の書式に基づいて任意の文字列を展開する。

サンプルコード

$ ls
0.txt  6_3.txt  createNumberTxt.rb  test.js
$ ls *.{txt,js}
0.txt  6_3.txt  test.js
$ echo {1..5}
1 2 3 4 5
$ echo {a..f}
a b c d e f