I tried

  echo "hello from server" | nc -l 1234

  nc -l 1234 << EOF
  hello from server
  EOF

  echo "hello from server" > tmpfile
  nc -l 1234 < tmpfile

and in all cases

  nc  -N 127.0.0.1 1234

prints "hello from server" but doesn't exit. Maybe I'm misunderstanding

     -N      shutdown(2) the network socket after EOF on the input.  Some
             servers require this to finish their work.

?


Cheers,

Patrick

Reply via email to