如何编写命令??
我试过了 find . -name test.bash | xargs bash dd bash: xx: No such file or directory
find . -name test.bash | xargs bash dd
bash: xx: No such file or directory
我也试过了 find . -name test.bash | xargs bash -c ,也不能工作。
find . -name test.bash | xargs bash -c
我创建了一个测试脚本,非常简单,它只打印参数。
#!/bin/bash echo "$@"
find . -name test.bash -exec {} arg1 arg2 \;
它运行并输出“arg1 arg2”。