This question already has an answer here:
- Write to FIFO only if it exists 1 answer
I tried using the -f flag to test if a named pipe is present
if [[ ! -f "$fifo" ]]; then echo 'There should be a fifo.lock file in the dir.' > /dev/stderr return 0; fi
this check does not seem correct. So perhaps a named-pipe is not a file, but something else?