jacobbridges / cutiepipe

Simple shell utility for named pipes in Linux. Written purely in Python.
0 stars 0 forks source link

Multiple output pipes #2

Open jacobbridges opened 8 years ago

jacobbridges commented 8 years ago

One input pipe to many output pipes. The data will be copied to all outputs.

Example:

# Some shell session
tail -f -n 1 data.csv | cutiepipe

# Another shell session
cutiepipe > data_copy1.csv

# Yet another shell session
cutiepipe > data_copy2.csv
Blastus commented 8 years ago

How this is implemented is up to you. There are numerous design decisions one could take is getting this to work:

If you are to add this functionality, it would probably be best to implement named pipes first. Then you could create a policy that receivers must be run first naming the pipe they wish to receive data on, and then the sender with the same named pipe must be run. Receivers that are started after the sender will not receive the sender's data. This gets around the problem of buffering data and timings.