#!/bin/sh # Make the FIFO (first time only) if [ ! -p "file.fifo" ] then mkfifo file.fifo fi # run script to write to FIFO and wait for it to finish ./writefifo.sh & cat file.fifo >/dev/null # open other end wait && echo "writer done" rm -f file.fifo exit 0 #### #!/bin/sh echo "a line to the fifo" >> file.fifo sleep 5