小编hon*_*eiy的帖子

将 find 命令的结果作为另一个命令的多个选项传递

我有一个 CLI 工具,可以采用具有多个值的选项 - 语法如下:

CLI -I path/to/file1 -I path/to/file2 ...
Run Code Online (Sandbox Code Playgroud)

如何将命令的结果传递find给此 CLI?


以供参考

如果是位置多个参数:

CLI path/to/file1 path/to/file2 ...
Run Code Online (Sandbox Code Playgroud)

我可以:

find "dir" -name "pattern" -exec CLI {} \+
Run Code Online (Sandbox Code Playgroud)

linux shell bash find

6
推荐指数
2
解决办法
529
查看次数

标签 统计

bash ×1

find ×1

linux ×1

shell ×1