Skip to content

stdin or -f command line file read stream (stream2 for node 0.8.x)

License

Notifications You must be signed in to change notification settings

angleman/in-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

in-stream

stdin or -f command line file read stream (stream2 for node 0.8.x)

Use Case

Assist with pipable shell. Also see out-stream

Install

npm install in-stream

Usage

sample.txt

hello

myapp:

#!/usr/local/bin/node
inStream = require('in-stream')
inStream.pipe(process.stdout)
ls | ./myapp
// myapp
// sample.txt

./myapp -f sample.txt
// hello 

Remember to chmod a+x myapp to make it executable

License

MIT

About

stdin or -f command line file read stream (stream2 for node 0.8.x)

Resources

License

Stars

Watchers

Forks

Packages

No packages published