Any of you use netcat at all? I'm trying to send the contents of a textfile to an IP and a port, so I'm running:
netcat 192.168.1.1 1234 filename.txt
Which pushes the contents of filename.txt to 1.1 on port 1234. It works, but the problem is that netcat never closes the connection when it finishes - it just hangs open, and if I do a netstat I can see an established connection to the remote host. What I'd like it to do is open the port, send the data, and then close the connection.
I'm missing something, I just don't know how to make nc drop the link when it's done.
Nevermind. -w (secs) at the end does it.