通过 xargs 连接带有变量的字符串

Dan*_*zik 2 bash

说我想要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)

Joh*_*024 5

如果使用很重要xargs

printf "%s\n" one two three | xargs  -I{} touch {}.html {}.css
Run Code Online (Sandbox Code Playgroud)