gpt4 book ai didi

bash - 在 bash 中为每个 "wildcard"参数添加一些文本

转载 作者:行者123 更新时间:2023-12-05 06:30:19 27 4
gpt4 key购买 nike

一个简单的例子:mybin *.txt 将扩展为 mybin a.txt b.txt c.txt

但我正在寻找一个简单的解决方案来扩展到类似的内容:mybin --conf a.txt --conf b.txt --conf c.txt

是否有内置功能可以做到这一点?最简单的方法是什么?

最佳答案

找到是我的 friend :

mybin $(find /wherever/ -name '*.txt' -printf '--conf %p ')

关于bash - 在 bash 中为每个 "wildcard"参数添加一些文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52530660/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com