I have a named fifo and I am writing random number to this fifo.
When I write to fifo I want to grep writed text in numbers.txt and write found row to stdout.
Content of numbers.txt file:
1 one
2 two
3 three
...
I want to search text which piped to grep in this file.
For example If I write 1 to named pipe, grep should print 1 one to stdout.
I try below but this does not write anything to stdout:
cat <> myfifo | grep -f - numbers.txt
How to achive this?