Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add support to tail stdin #107

Open
00cpxxx opened this issue Jul 19, 2020 · 2 comments
Open

Feature request: Add support to tail stdin #107

00cpxxx opened this issue Jul 19, 2020 · 2 comments

Comments

@00cpxxx
Copy link

00cpxxx commented Jul 19, 2020

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.

@lucagrulla
Copy link
Owner

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.

@00cpxxx
Copy link
Author

00cpxxx commented Jul 21, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants