DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ 2 T

⟦335d62335⟧ TextFile

    Length: 2044 (0x7fc)
    Types: TextFile
    Names: »2dpipe.1«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/2dpipe/2dpipe.1« 

TextFile

.TH 2DPIPE 1
.SH NAME
0, 1, 2 \- create two-dimensional pipelines.
.SH SYNOPSIS
.B 0
pipeline
.br
.B 1
pipeline
.br
.B 2
pipeline
.SH DESCRIPTION
Each of these commands
executes the
.I pipeline
asynchronously,
redirecting the file descriptor
of the same name to a named pipe.
The output of the command is the name of the pipe created.
The pipe is removed on termination.
.P
The commands can be used to implement
a two-dimensional pipeline of commands
composed from the one-dimensional pipelines
possible in
.IR sh (1).
Pipelines are joined
by commands
which have
input files as arguments
and split
by commands
which have
output files as arguments.
This is done by 
replacing the
file argument by the grave accented execution(see 
command substitution in
.IR sh (1))
of the required pipeline by
.B 0
for splitting and
.B 1
for joining.
.SH EXAMPLES
To print the common lines between two unsorted files, 
.IR f1 " and " f2
.P
.RS
comm -12 \(ga1 sort f1\(ga \(ga1 sort f2\(ga
.RE
.P
To view a full directory listing
of a directory
.I dir
.P
.RS
vi \(ga1 ls -lR dir\(ga
.RE
.P
To view the compilation errors of
.I t.c
.P
.RS
vi \(ga2 cc -S t.c\(ga
.RE
.P
Write out the
list of all group name and gid pairs
which have a corresponding user name and uid pair
sorted by name and then by number into
.I name_order
and 
.I number_order
respectively.
.P
.RS
comm -12 \(ga1 \(aacut -f1,3 -d: /etc/passwd | sort\(aa\(ga \e
.br
\(ga1 \(aacut -f1,3 -d: /etc/group | sort\(aa\(ga |
.br
tee \(ga0 \(aasort +0 -t: > name_order\(aa\(ga | sort +1n -t: > number_order
.RE
.SH FILES
/tmp/fifo$$
.SH WARNING
If the pipeline to be executed has
characters special to the shell these
must be escaped.
If
.IR lseek (2)
is attempted on the pipe the process will fail.
It is quite heavy on processes so one may reach
a user process limit on complex pipes.
If the named pipe is not read or written
in 20 seconds the pipe is removed.
This is to avoid pipes from hanging around
indefinitely if a command never accesses
its file argument.
.SH SEE ALSO
sh(1), tee(1), lseek(2).