A command-line utility to join input files. Create a thread for each input file that reads a line, and write a line each time any thread reads it.
Keywords: command line utility, pipe, parallel execution
cargo install joyn
joyn file1 file2 ...
Read input files and their content lines and output them.
The order of lines in the output is "interleaved". That is, unlike the cat
command, lines in the file specified earlier in the command line may be output later.
However, the expected use of joyn
is to invoke the processes that run command lines and merge their output lines.
In the case of bash
shell, this usage can be accomplished with a command line such as:
joyn <(command line 1) <(command line 2) ...
→ Difference between command substitution joined with cat and joined with joyn
- feat: add option --info to replace option --summary. In addition to the number of lines displayed by --summary, print the buffer size when the input is a pipe
- fix: reduce number of bytes copied (between buffers)
- feat: new option --buffer-size
- fix: reduce number of mutex operations
- fix: characters in the input files were sometime missed
- chore: enable LTO in release build
- fix: add code to avoid the potential race conditions
- feat: new option --summary to print LOC of each input file on exit
- First release