bash shell 小技巧
可以使用 {} 做展開的動作 [test@test ~ ~]# echo {red,green,white} red green white [test@test ~ ~]# [test@test ~ ~]# echo {red,green,white}ball redball greenball whiteball [test@test ~ ~]# [test@test ~ ~]# echo {ball,cat,rat}{red,green,white} ballred ballgreen ballwhite catred catgreen catwhite ratred ratgreen ratwhite [test@test ~ ~]# [test@test ~ ~]# ls exmaple.c [test@test ~ ~]# cp exmaple.c{,.bak} [test@test ~ ~]# ls exmaple.c exmaple.c.bak [test@test ~ ~]# |
沒有留言:
張貼留言