Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* ブレース展開 [#ub83c2f9]
** ブレース展開とは? [#k03f3181]
$ echo {foo,bar,baz}
foo bar baz # (1)
$ echo foo{,bar,baz}
foo foobar foobaz # (2)
- '''{}'''の中に文字列を''','''で区切って列挙すると(1)の...
- この時、ブレースの前に文字列を置き、ブレースの中に空文...
** ブレース展開を利用してcpのファイル名を指定する [#rb613...
$ touch test.txt
$ cp test.txt{,.orig}
$ ls -1
test.txt
test.txt.orig
- cpコマンドでファイル名に拡張子(ここでは.orig)を省力化...
** 参考 [#x972a07c]
https://www.gnu.org/software/bash/manual/html_node/Brace-...
終了行:
* ブレース展開 [#ub83c2f9]
** ブレース展開とは? [#k03f3181]
$ echo {foo,bar,baz}
foo bar baz # (1)
$ echo foo{,bar,baz}
foo foobar foobaz # (2)
- '''{}'''の中に文字列を''','''で区切って列挙すると(1)の...
- この時、ブレースの前に文字列を置き、ブレースの中に空文...
** ブレース展開を利用してcpのファイル名を指定する [#rb613...
$ touch test.txt
$ cp test.txt{,.orig}
$ ls -1
test.txt
test.txt.orig
- cpコマンドでファイル名に拡張子(ここでは.orig)を省力化...
** 参考 [#x972a07c]
https://www.gnu.org/software/bash/manual/html_node/Brace-...
ページ名: