Next | 33 |
One of my best inventions was netcat
netcat hostname port
It would open and connect a network socket
Then it would copy stdin into the socket
and copy the socket's replies to stdout
For example, you could implement finger like this:
#!/bin/sh echo $1 | netcat $2 79
(The finger protocol was pretty simple.)
Next | Copyright © 2011 M. J. Dominus |