Sample Header Ad - 728x90

Why does this script with a FIFO pipe not terminate?

11 votes
2 answers
16728 views
This script:
shell
#!/bin/bash
tmppipe=/tmp/temppipe
mkfifo $tmppipe
echo "test" > $tmppipe
cat $tmppipe
exit
does not terminate. I assume that the cat command is waiting for an EOF from the pipe; how do I send one?
Asked by Benubird (6082 rep)
Jun 4, 2015, 09:27 AM
Last activity: May 9, 2024, 11:05 AM