If there is nothing in a named pipe and I do:
it will wait until data arrives. Is there a flag I can use to exit immediately if there is no data to be read? Or perhaps a command other than cat that I can use?
I also tried:
read val < "$my_named_pipe";
but this also waits for the next chunk of data – I don't want to wait if the fifo is empty.