# net2sh - converts net programs into shell script mkfifo pipes mkfifo docs mkfifo procs mkfifo pipes1 mkfifo pipes2 mkfifo comments mkfifo mkfifos mkfifo procs_bg mkfifo procs_named mkfifo rmfifos mkfifo wait classs '#' docs '|' pipes '*' procs <&0 & # split tee pipes1 pipes2 & # tee cat comments mkfifos procs_named wait rmfifos >&1 & # concat sed 's/^/#\t/' comments & # ins # sed 's/^/mkfifo\t/' mkfifos & # ins mkfifo sed 's/^/rm\t/' rmfifos & # ins rm sed 's/$/ \&/' procs_bg & # app & sed 's/\([^\t]*\)\t\(.*\)/\2\t# \1/' procs_named & # name to comment echo wait >wait & # write wait rm pipes rm docs rm procs rm pipes1 rm pipes2 rm comments rm mkfifos rm procs_bg rm procs_named rm rmfifos rm wait