Dan Bar Dov wrote:
I need to continuously compress inputs that arrive from time to time
into one stream.

My idea was to create a named pipe, set a gzip reading from it, and then
Writing to it using cat, tee -a etc.
Basically like that:

mknod P p
gzip - < P > p.gz &

while something
do
        do-something | tee -a P
done


A fifo will allow you to run the zipper as a non-root user, so it might make a better choice than a named pipe. You also need to make sure that the input process doesn't terminate. Should be fairly simple...

Zipper:

mkfifo /tmp/my-fifo
gzip - < /tmp/my-fifo > p.gz &


Input process:


while something
do
        do-something
done | tee -a /tmp/my-fifo



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to