4 filechan \- file-writing backend for InterNetNews
21 reads lines from standard input and copies certain fields in
22 each line into files named by other fields within the line.
24 is intended to be called by
27 (It is not a full exploder and does not accept commands; see
29 for a description of the difference, and
31 for an exploder program.)
34 input is interpreted as a sequence of lines.
35 Each line contains a fixed number of initial fields, followed by a
36 variable number of filename fields.
37 All fields in a line are separated by whitespace.
38 The default number of initial fields is one.
40 For each line of input,
42 writes the initial fields, separated by whitespace and followed by a
43 newline, to each of the files named in the filename fields.
44 When writing to a file,
46 opens it in append mode and tries to lock it and change the
47 ownership to the user and group who owns the directory where the file is
50 Because the time window in which a file is open is very small, complicated
51 flushing and locking protocols are not needed; a
55 for a couple of seconds is sufficient.
59 The ``\fB\-f\fP'' flag may be
60 used to specify a different number of initial fields.
65 writes its output into the directory
66 .IR <pathoutgoing\ in\ inn.conf> .
67 The ``\fB\-d\fP'' flag may be used to specify a directory the program should
68 change to before starting.
71 If the ``\fB\-p\fP'' flag is used, the program will write a line containing
72 its process ID (in text) to the specified file.
75 A map file may be specified by using the ``\fB\-m\fP'' flag.
76 Blank lines and lines starting with a number sign (``#'') are ignored.
77 All other lines should have two host names separated by a colon.
78 The first field is the name that may appear in the input stream;
79 the second field names the file to be used when the name in the first
81 For example, the following map file may be used to map the short
82 names used in the example below to the full domain names:
95 is invoked with ``\fB\-f 2\fP'' and given the following input:
99 news/software/b/132 <1643@munnari.oz.au> foo uunet
100 news/software/b/133 <102060@litchi.foo.com> uunet munnari
101 comp/sources/unix/2002 <999@news.foo.com> foo uunet munnari
107 will have these lines:
111 news/software/b/132 <1643@munnari.oz.au>
112 comp/sources/unix/2002 <999@news.foo.com>
118 will have these lines:
122 news/software/b/133 <102060@litchi.foo.com>
123 comp/sources/unix/2002 <999@news.foo.com>
129 will have these lines:
133 news/software/b/132 <1643@munnari.oz.au>
134 news/software/b/133 <102060@litchi.foo.com>
135 comp/sources/unix/2002 <999@news.foo.com>
139 Written by Robert Elz <kre@munnari.oz.au>, flags added by Rich $alz
140 <rsalz@uunet.uu.net>.
142 This is revision \\$3, dated \\$4.
144 .R$ $Id: filechan.8 5909 2002-12-03 05:17:18Z vinocur $