Skip to content

Commit

Permalink
Tweak wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Feb 28, 2022
1 parent 68921b7 commit 2cb292a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,11 @@ don’t have quite the same ring to them.
Use unbuffered output for the print statements. In C and C++ code, use
`fprintf(stderr, ...)`. In Rust code use `eprintln!` or `dbg!`.

Pipe the stderr output to file, e.g. `firefox 2> log`.
Pipe the stderr output to file, e.g. `my-prog 2> log`.

If you are generating large amounts of data, piping your data through a fast
compressor could be convenient. `zstd` can process gigabytes per second,
while saving more than 90% on disk usage. Use `firefox 2>&1 >/dev/null | zstd
--fast -o log.zst` to write and `zstdcat log.zst | counts` to process.
If the log files get large, piping the data through a fast compressor such as
`zstd` may be worthwhile. For example, `my-prog 2>&1 >/dev/null | zstd
-f -o log.zst` to write and `zstdcat log.zst | counts` to process.

Sometimes programs print other lines of output to stderr that should be ignored
by `counts`. (Especially if they include integer IDs that `counts -i` would
Expand Down

0 comments on commit 2cb292a

Please sign in to comment.