UNIX ブレース展開

dotinstall:~ $ echo {a,b,c}
a b c
dotinstall:~ $ echo {1..10}{a..g}
1a 1b 1c 1d 1e 1f 1g 2a 2b 2c 2d 2e 2f 2g 3a 3b 3c 3d 3e 3f 3g 4a 4b 4c 4d 4e 4f 4g 5a 5b 5c 5d 5e 5f 5g 6a 6b 6c 6d 6e 6f 6g 7a 7b 7c 7d 7e 7f 7g 8a 8b 8c 8d 8e 8f 8g 9a 9b 9c 9d 9e 9f 9g 10a 10b 10c 10d 10e 10f 10g
dotinstall:~ $ mkdir test && cd test
dotinstall:~/test $ mkdir app{1..5}
dotinstall:~/test $ ls
app1 app2 app3 app4 app5
dotinstall:~/test $ touch app{1..5}/test{1..3}{.jpg,.png,.gif}
dotinstall:~/test $ ls app2
test1.gif test1.png test2.jpg test3.gif test3.png
test1.jpg test2.gif test2.png test3.jpg
]dotinstall:~/test $ ]rm app{1..5}/test{1..3}{.jpg,.gif}
bash: ]rm: command not found
dotinstall:~/test $ rm app{1..5}/test{1..3}{.jpg,.gif}
dotinstall:~/test $ ls app2
test1.png test2.png test3.png
dotinstall:~/test $ cd
dotinstall:~ $ rm -r test/
dotinstall:~ $

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です