Click to See Complete Forum and Search --> : is there a replacement for the buffer command?


ev8r
08-12-2003, 02:55 PM
There used to be a command in bash scripting that would look something like this:


command1 | buffer > command2. whereas the buffer comand would store data until command2 was ready to read from it.

what im needing is a way to buffer data between 2 processes. 1 of which reads realtime measurement data(sampled at a fixed rate, which cannot be flow-controlled) and sends it to process 2 (which has a variable processing time)...

i am wondering what this utility was replaced with as it would be useful right now.......any insight would be great

thnx

Strogian
08-12-2003, 05:05 PM
You've tried just using a normal pipe, I take it? :) What happens there, does bash try to suspend the first process every so often?

You know, you could probably write your own buffering program fairly easily. Or, better yet, output it to a file, and then, when you're all done, run process2 with that file as input. (it's possible that you'd end up wasting all that disk space anyway, if you ran a buffered pipe long enough) Now that I think of it, maybe this is what FIFO's are for. You can create one of them with mknod, I think.

ev8r
08-13-2003, 12:46 PM
cool thx

ill try a fifo!