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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -