{
"manifest_version": 2,
"short_name": "React App",
"name": "Create React App Sample",
"description": "google chrome extension",
"version": "1.0",
"browser_action": {
"default_icon": "favicon.ico",
"default_popup": "index.html"
},
"background": {
"scripts": ["background.js"]
},
"permissions": [
"tabs"
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
我想将mkdir dir{0..99}
echo hello > file
复制到每个目录,file
复制到dir0
。
目前,我想到的最好的解决方案是:
dir99
但是必须有更优雅的方法来做到这一点。
是否可以使用类似于下面的命令将文件for i in {0..99}; do cp file dir$i; done
到多个目录?
cp
答案 0 :(得分:0)
您可以使用xargs
呼叫cp
100次:
echo dir{0..99} | xargs -n 1 cp file
检查xargs
的人