<unclear what is being asked> #2594
-
There does not seem to be a way to catch the output of ripgrep in a textfile. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Sounds to me like you're searching the same file that you're writing to, creating an infinite loop. Why not check the contents of the file to see if anything has been written? (ripgrep has no problem being piped to a file or another program. You might try a little debugging by trying a simpler example to confirm.) |
Beta Was this translation helpful? Give feedback.
-
Also, I use two laptops. One is Win10Pro, the other is Win11Pro. When I tried to install the linux version on the later, A suitable version could not be found. Then I installed the Windows exec on system path. This added to the confusion. Oh, yes, the question was 'can the output of rg be piped to a file', yes is your answer. Nothing unclear about that. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I'll try to be more succinct. Thanks again. |
Beta Was this translation helpful? Give feedback.
Just ran the script successfully. The problem is Windows WSL. I've noticed that occasionally, things will start to go wrong while working in bash. Simply closing the window doesn't work. The computer has to be re-booted. That's what I just finished doing before running the script again. Thanks for your input.
Additionally, I was using the Windows exec in the system path. When I installed using apt install instead, everything worked.