Socket(1) implements an interface to TCP sockets at shell level. Client and server sockets can be used from shell scripts or interactively. Socket can also run a program with stdin, stdout, and stderr connected to the socket connection. A number of sample shell scripts are included. The current version has been not tested thoroughly, but should run on some Linuxes (well, pick your favourite distribution and see if it runs), Solaris (9), and FreeBSD (5.x). It should be not too hard to port to similar platforms.
Patch release 3 of version 1.5 has a few minor, rather un-technical updates. Download socket-1.5p3
Patch release 2 of version 1.5 has an update of my e-mail address, plus, from patch release 1, a fix for a problem with IRIX 6.5 -- the variable name ``sa_len'' conflicted with a macro and caused perplexing compile errors. Renamed to soa_len. Download socket-1.5p2 here.
Version 1.5 features IPv6 support, optional half close on eof, and optional connection reset on SIGINT and SIGTERM. Finally SIGHUP is handled correctly. Boris Nikolaus made most of these changes. Thanks, Boris! Prereleases of 1.5 have been running fine for me for a while now, so I don't expect major problems.
The previous version is 1.4; see the CHANGES for details.
Even older versions are 1.3, 1.2p1, 1.1.
If this program does not quite meet your needs, have a look at Dan Bernstein's ucspi-tcp. You will probably want to use the patches to make it IPv6-compatible.