Skip to content

mafintosh/merge-cat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

merge-cat

Cat tool that does a streaming merge sort on the input and outputs the lines of files concatenated in sort order. Expects the input files to be sorted as well

npm install -g merge-cat

Usage

npm install -g merge-cat
# will stream out the sorted concatenation of the two files
merge-cat sorted-file-1 sorted-file-2

If you want to keep reading the files (useful if you are catting logs) use --follow

merge-cat sorted-file-1 sorted-file-2 --follow

If you only want to read from the end of the files use --tail

merge-cat sorted-file-1 sorted-file-2 --tail

JS API

There is a js api available as well

var merge = require('merge-cat')
var stream = merge(sortedStream1, sortedStream2)
stream.pipe(process.stdout)

License

MIT

About

Cat tool that does a streaming merge sort on the input and outputs the lines of files concatenated in sort order.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published