Skip to content

Counting newlines in output #2176

Answered by BurntSushi
tsoutsman asked this question in General
Discussion options

You must be logged in to vote

Try comparing the output of rg example and rg example | cat. That should hopefully answer your question.

Try the same with ls and ls | 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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tsoutsman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants