diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-26 16:38:00 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-26 16:38:00 -0400 |
| commit | 97d5c458cfa039d857301e1ca7d5af3beb37131d (patch) | |
| tree | b460cd850d0537eb71806ba30358840377b27688 /static/plan9-4e/man1/pipefile.1 | |
| parent | b89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff) | |
build: Better Build System
Diffstat (limited to 'static/plan9-4e/man1/pipefile.1')
| -rw-r--r-- | static/plan9-4e/man1/pipefile.1 | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/static/plan9-4e/man1/pipefile.1 b/static/plan9-4e/man1/pipefile.1 new file mode 100644 index 00000000..19f207f3 --- /dev/null +++ b/static/plan9-4e/man1/pipefile.1 @@ -0,0 +1,101 @@ +.TH PIPEFILE 1 +.SH NAME +pipefile \- attach filter to file in name space +.SH SYNOPSIS +.B pipefile +[ +.B -d +] [ +.B -r +.I command +] [ +.B -w +.I command +] +.I file +.SH DESCRIPTION +.I Pipefile +uses +.IR bind (2) +to attach a pair of pipes to +.IR file , +using them to +interpose filter +.I commands +between the true file and the simulated file that subsequently +appears in the name space. +Option +.B -r +interposes a filter that will affect the data delivered to programs that read from +.IR file ; +.B -w +interposes a filter that will affect the data written by programs to +.IR file . +At least one +.I command +must be specified; +.I pipefile +will insert a +.IR cat (1) +process in the other direction. +.PP +After +.I pipefile +has been run, the filters are established for programs that subsequently +open the +.IR file ; +programs already using the +.I file +are unaffected. +.PP +.I Pipefile +opens the +.I file +twice, once for each direction. If the +.I file +is a single-use device, such as +.BR /dev/mouse , +use the +.B -d +flag to specify that the file is to be opened once, in +.B ORDWR +mode. +.SH EXAMPLES +Simulate an old terminal: +.EX +.IP +% pipefile -w 'tr a-z A-Z' /dev/cons +% rc -i </dev/cons >/dev/cons >[2=1] +% echo hello +HELLO +% +.EE +.PP +Really simulate an old terminal: +.EX +.IP +% pipefile -r 'tr A-Z a-z' -w 'tr a-z A-Z' /dev/cons +% rc -i </dev/cons >/dev/cons >[2=1] +% DATE +THU OCT 12 10:13:45 EDT 2000 +% +.EE +.SH SOURCE +.B /sys/src/cmd/pipefile.c +.SH SEE ALSO +.IR mouse (8) +.SH BUGS +The I/O model of +.I pipefile +is peculiar; it doesn't work well on plain files. +It is really intended for use with continuous devices such as +.I /dev/cons +and +.IR /dev/mouse . +.I Pipefile +should be rewritten to be a user-level file system. +.PP +If the program using the file managed by +.I pipefile +exits, the filter will see EOF and exit, and the file will be unusable +until the name space is repaired. |
