パラメータ展開 - ブラケットブラケット展開 $ touch foo{1,2,3}.txt
$ ls
foo1.txt foo2.txt foo3.txt
cpコマンドでファイル名を使いまわしたい場合 $ touch 1.txt
$ cp 1.txt{,.old}
$ ls
1.txt 1.txt.old
ブラケット展開のネスト $ echo foo{1,2}.{txt,html}
foo1.txt foo1.html foo2.txt foo2.html
参考https://www.cyberciti.biz/faq/explain-brace-expansion-in-cp-mv-bash-shell-commands/ }} |
|