说我想要touch六个文件
one.html
one.css
two.html
two.css
three.html
three.css
Run Code Online (Sandbox Code Playgroud)
我xargs该如何使用?我正在查看手册页,但我不确定获取 stdin 管道的语法。
$ echo one two three | xargs -n 1 touch $1.html $1.css // nope
Run Code Online (Sandbox Code Playgroud)
如果使用很重要xargs:
printf "%s\n" one two three | xargs -I{} touch {}.html {}.css
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
824 次 |
| 最近记录: |