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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

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