任何bash大师知道如何把下面的命令变成一个class轮?
trutch:$ touch app/views/pages/_sponsors.html.erb trutch:$ touch app/views/pages/_donations.html.erb trutch:$ touch app/views/pages/_volunteers.html.erb
我希望能够做到这样的事情:
trutch:$ touch app/views/pages/[ARRAY].html.erb
如果你有像这样的bash技巧的任何来源,也将不胜感激。
简单的bash列表可以用于这个:
touch app/views/pages/_{sponsors,donations,volunteers}.html.erb
看看Bash One-Liners的提示,但手册页也非常详细。
也许你想要这个:
touch app/views/pages/{_sponsors,_donations,_volunteers}.html.erb