How to flush a pipe using bash -
I have a script that writes in the named pipes and the other reads from the pipe. Occasionally, while starting the script, I have seen that the content of the pipe exists from the previous run of the script. Is there any way to flush the pipes at the beginning of the script?
I think DD
is your friend:
dd if = myfifo nonblock
iflag == dev / null
and in fact Does not even block on an empty FIFO.
Comments
Post a Comment