#!/bin/bash rm out mkfifo out nc -l 8080 < out | while read line do echo hello > out echo $line done
If I browse to the IP of the machine this script is running on (using port 8080), I would expect to see the word 'hello' and then on the machine running the script, I would expect it to output lines from the request.
However, nothing happens. The browser gets no response, and nothing is output to the server's terminal.
Why doesn't it work, and what can I modify to make it work? I want to keep it to simple pipes, I don't want to use process substitution or anything like that.