ls:
prwx------ 1 root root 0 fifo
write.sh:
#! /bin/bash
while true;
do
echo "blah" > fifo
done
read.sh:
#! /bin/bash
while true;
do
cat fifo
done
I have two terminals open, one running write.sh and another running read.sh. When I start write.sh first, it hangs (like it should). Then I go to the other terminal and start read.sh and it prints out "blah" a ton of times, then my write.sh stops. Why is my write script stopping? This is a little test I'm doing to try and understand pipes a little better because I'm going to be sending all my logs to a pipe so I can parse through them before writing them to a file.
What am I missing here?