Bidirectional pipe for unix shells


0. Contents

   1. Purpose
   2. Copying
   3. Installation
   4. Downloading

1. Purpose

Use twinpipe to start two processes from the unix shell, so that the processes talk to each other via stdout and stdin.

For example, you could use it to start two ppp processes which need to talk to each others (for VPN solutions).

Twinpipe starts the two processes (shell commands) and makes sure that one's stdout is another's stdin.

Two versions are included: A C-language version and shellscript-version.
The shellscript-version uses a named pipe (fifo) to do the trick, and the C-language version just creates two pipes and executes the programs.
Example of usage: twinpipe 'echo a;head -n 1 >&2' 'echo b;echo c'

The package, when compiled, also builds a usleep shell utility, which takes only one argument: microsecondcount, and expectedly sleeps the wanted duration. Example: usleep 200000 (sleeps 0.2s).

2. Copying

twinpipe (the shellscript version and the C version) have been written by Joel Yliluoma, a.k.a. Bisqwit,
and is distributed under the following terms:
* No warranty. You are free to modify this source and to
* distribute the modified sources, as long as you keep the
* existing copyright messages intact and as long as you
* remember to add your own copyright markings.
* You are not allowed to distribute the program or modified versions
* of the program without including the source code (or a reference to
* the publicly available source) and this notice with it.

3. Installation

$ make
$ su
# make install

4. Downloading

Downloading help

  • Do not download everything - you only need one file (newest version for your platform)!
  • Do not use download accelerators or you will be banned from this server before your download is complete!

The most recent source code (bleeding edge) for twinpipe can also be downloaded by cloning the Git repository by:

Date (Y-md-Hi) acc        Size Name                
2012-0518-1139 r--       11111 twinpipe-1.0.6.tar.bz2
2012-0518-1139 r--       10673 twinpipe-1.0.6.tar.gz
2002-0514-1752 r--        8112 twinpipe-1.0.5.tar.bz2
2002-0514-1752 r--        3972 patch-twinpipe-1.0.4-1.0.5.bz2
2002-0318-0210 r--        6052 twinpipe-1.0.4.tar.bz2
2002-0318-0210 r--        2926 patch-twinpipe-1.0.3-1.0.4.bz2
2002-0209-2332 r--        5670 twinpipe-1.0.3.rar
2002-0209-2332 r--        5913 twinpipe-1.0.3.tar.bz2
2002-0209-2332 r--        5347 patch-twinpipe-1.0.2-1.0.3.bz2
2001-0418-2209 r--        2089 twinpipe-1.0.2.rar
2001-0418-2209 r--        2295 twinpipe-1.0.2.tar.bz2
2001-0418-2209 r--        2434 twinpipe-1.0.2.zip
2001-0418-2209 r--        1155 patch-twinpipe-1.0.1-1.0.2.bz2
2000-0823-0407 r--        1966 twinpipe-1.0.1.rar
2000-0823-0407 r--        2155 twinpipe-1.0.1.tar.bz2
2000-0823-0407 r--        2310 twinpipe-1.0.1.zip
2000-0823-0407 r--        1395 patch-twinpipe-1.0.0-1.0.1.bz2
2000-0820-1436 r--        1778 twinpipe-1.0.0.tar.bz2
2000-0820-1436 r--        1895 twinpipe-1.0.0.zip
Back to the source directory index at Bisqwit's homepage