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:

< Preblue dd if = myfifo nonblock

iflag == dev / null

and in fact Does not even block on an empty FIFO.


Comments

Popular posts from this blog

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -

gtk - Python Window Resize -

c# - read full xml file data over tcp -