I'm trying to write a script that will run a program, wait for a certain output from the program, then continue execution (and leave the program running.) My current code doesn't seem to ever output anything, sed never returns true. This echos "Peerflix started" but that's it.
exec 3< <(peerflix $1 -p 8888)
echo "Peerflix started."
sed '/server$/q' <&3
echo 'Matched'