node-tail icon indicating copy to clipboard operation
node-tail copied to clipboard

Feature request: Add support to tail stdin

Open 00cpxxx opened this issue 5 years ago • 2 comments

Hi, thanks for this very useful package. I have been using it for some tests and I would like to now if it is possible to expand it to support reading input from stdin instead of a file. This would allow to instead of doing:

./program > log.txt node tail.js log.txt

To simply do:

./program | node tail.js

This would avoid disk writing.

I'm not a Node programmer so I don't know how to change the code to add such support, and I tried looking for solutions to this but could not find anything as nice as node-tail.

00cpxxx avatar Jul 19 '20 16:07 00cpxxx

hi @00cpxxx ,

Thanks for youe feature request.

Is there anything that stops you to use your shell tail?

./ program  | tail

No need to use a node library here, bash (or whatever shell you like to use) already supports your use case.

lucagrulla avatar Jul 21 '20 21:07 lucagrulla

Thanks for the reply. I'm using your package to feed a websocket and show contents in a browser in another location.

00cpxxx avatar Jul 21 '20 23:07 00cpxxx