Does anybody know of any way to mix something like tail up with something like wc and get a scrolling "new lines per second" number? Or maybe there's a util that specifically does this?

Recommended Answers

All 2 Replies

what do you mean new lines per second? are you looking for a rate? Example
20 newlines/second

what do you mean new lines per second? are you looking for a rate? Example
20 newlines/second

Exactly. So, for example, say I have a http request log, using this "whatever" tool, I can type something like this:

tail -f request.log | whatever -n 1

where -n 1 means to count the new lines every 1 second, and the output over the next 5 seconds continuing to eternity is, e.g., like this:

43
46
134
67
34
...

This output would mean that in the 1st second after I typed the command, 43 newlines were added to the request.log, in the 2nd second 46 newlines were added, in the 3rd second there was a spike of 134 newlines, etc.

Wouldn't this be cool? There's got to be a way to do this...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.