![](/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.