Skip to content

A simple program reads multiple input stream and writes into one. For example merge multiple program output into one.

Notifications You must be signed in to change notification settings

tamastarjanyi/smerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

smerge

A really simple program to take multiple input stream and merge those into one output stream.

Simple usage:

M=1 ./smerge \
<(while true ; do echo "$(date) - slave $(tr -dc A-Za-z </dev/urandom|head -c 32; echo '')" ; sleep $((RANDOM%M)); done &) \
<(while true ; do echo "$(date) - master $(tr -dc A-Za-z </dev/urandom|head -c 32; echo '')" ; sleep $((RANDOM%M)); done &) \
<(while true ; do echo "$(date) - client $(tr -dc A-Za-z </dev/urandom|head -c 32; echo '')" ; sleep $((RANDOM%M)); done &)

Complex usage (Don't do that!!!):

mkfifo fa; mkfifo fb;
./smerge fa fb
while true ; do echo "$(date) -  slave" ; sleep $((RANDOM%3)); done >>fa &
while true ; do echo "$(date) - master" ; sleep $((RANDOM%3)); done >>fb & 

About

A simple program reads multiple input stream and writes into one. For example merge multiple program output into one.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published