![](/img/trans.png)
[英]How do I fuzzy find all files containing specific text using ripgrep and fzf and open it VSCode
[英]How to use ripgrep to replace all matches within all files?
我可以使用以下命令在标准输出中打印所有更改的文件和内容
rg --passthru -F "red" -r "green" -N
Output:
ip.txt
blue test1
green 2
hello blue world
ip2.txt
blue test1
green 2
hello blue world
ip3.txt
green test1
green 2
hello green world
ip4.txt
green test1
green 2
hello green world
如何将这些内容更改的文件写入原始文件。
你不能单独使用 ripgrep。 ripgrep 在设计上不支持它。 它从不写入文件。 它只读取它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.