Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
请参阅在 fish 中执行以下命令,然后 bash:
tmp ) touch file1 file2 file3 file4 tmp ) find . -exec echo {} \; tmp ) bash ^_^ ~/tmp > find . -exec echo {} \; . ./file3 ./file2 ./file1 ./file4
为什么鱼听不懂echo {} \;?
echo {} \;
感谢卡尔。
{}在鱼中有特殊的含义。它们需要被转义才能使用find,例如:
{
}
find
find . -exec echo \{\} \;
'{}'在我看来,也可以使用以下错误报告,这是一种更简洁的语法。
'{}'
所以你最终会得到find . -exec echo '{}' \;
find . -exec echo '{}' \;
https://github.com/fish-shell/fish-shell/issues/95