Counting newlines in output #2176
-
Hi, this question doesn't strictly relate to ripgrep, but hopefully, it's not too off-topic. The command |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Try comparing the output of Try the same with The trick here is that tools like ripgrep and ls change their output format based on whether they're writing to a tty or not. |
Beta Was this translation helpful? Give feedback.
Try comparing the output of
rg example
andrg example | cat
. That should hopefully answer your question.Try the same with
ls
andls | cat
for example.The trick here is that tools like ripgrep and ls change their output format based on whether they're writing to a tty or not.