Is there a way to print out filename and line number separated by colon? #2031
-
Currently the default output shows the filenames and then each case listed underneath. Using
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can switch to the standard grep output format with
It does not.
Well, that's what ripgrep does with the
You could probably also do something with the |
Beta Was this translation helpful? Give feedback.
-
You need to add |
Beta Was this translation helpful? Give feedback.
You can switch to the standard grep output format with
--no-heading
.It does not.
It prints matching file paths and the number of matching lines.It prints just the matching file paths. If you combine it with-c/--count
, then it also includes the number of matching lines.Well, that's what ripgrep does with the
--no-heading
flag, with the exception of also printing the matching contents. So you just have to get rid of the matching contents. Here are a few ways to do that, given a query offoo
: