1FILECHAN(8)                 System Manager's Manual                FILECHAN(8)
2
3
4

NAME

6       filechan - file-writing backend for InterNetNews
7

SYNOPSIS

9       filechan [ -d directory ] [ -f num_fields ] [ -m mapfile ] [ -p pidfile
10       ]
11

DESCRIPTION

13       Filechan reads lines from standard input and copies certain  fields  in
14       each  line  into files named by other fields within the line.  Filechan
15       is intended to be called by innd(8) as a channel feed.  (It  is  not  a
16       full  exploder  and  does  not  accept commands; see newsfeeds(5) for a
17       description of the difference, and buffchan(8)  for  an  exploder  pro‐
18       gram.)
19
20       Filechan  input  is interpreted as a sequence of lines.  Each line con‐
21       tains a fixed number of initial fields, followed by a  variable  number
22       of  filename fields.  All fields in a line are separated by whitespace.
23       The default number of initial fields is one.
24
25       For each line of input, filechan writes the initial  fields,  separated
26       by  whitespace and followed by a newline, to each of the files named in
27       the filename fields.  When writing to a  file,  filechan  opens  it  in
28       append  mode  and tries to lock it and change the ownership to the user
29       and group who owns the directory where the file is being written.
30
31       Because the time window in which a file is open is very small,  compli‐
32       cated  flushing  and locking protocols are not needed; a mv(1) followed
33       by a sleep(1) for a couple of seconds is sufficient.
34

OPTIONS

36       -f num_fields
37              The ``-f'' flag may be used to specify  a  different  number  of
38              initial fields.
39
40       -d directory
41              By  default,  filechan  writes  its  output  into  the directory
42              <pathoutgoing in inn.conf>.  The ``-d''  flag  may  be  used  to
43              specify  a  directory the program should change to before start‐
44              ing.
45
46       -p pidfile
47              If the ``-p'' flag is used, the program will write a  line  con‐
48              taining its process ID (in text) to the specified file.
49
50       -m mapfile
51              A  map  file  may  be specified by using the ``-m'' flag.  Blank
52              lines and lines starting with a number sign (``#'') are ignored.
53              All other lines should have two host names separated by a colon.
54              The first field is the name that may appear in the input stream;
55              the  second field names the file to be used when the name in the
56              first field appears.  For example, the following map file may be
57              used  to  map  the  short names used in the example below to the
58              full domain names:
59
60              # This is a comment
61              uunet:news.uu.net
62              foo:foo.com
63              munnari:munnari.oz.au
64

EXAMPLES

66       If filechan is invoked with ``-f 2'' and given the following input:
67
68              news/software/b/132 <1643@munnari.oz.au> foo uunet
69              news/software/b/133 <102060@litchi.foo.com> uunet munnari
70              comp/sources/unix/2002 <999@news.foo.com> foo uunet munnari
71
72       Then the file foo will have these lines:
73
74              news/software/b/132 <1643@munnari.oz.au>
75              comp/sources/unix/2002 <999@news.foo.com>
76
77       the file munnari will have these lines:
78
79              news/software/b/133 <102060@litchi.foo.com>
80              comp/sources/unix/2002 <999@news.foo.com>
81
82       and the file uunet will have these lines:
83
84              news/software/b/132 <1643@munnari.oz.au>
85              news/software/b/133 <102060@litchi.foo.com>
86              comp/sources/unix/2002 <999@news.foo.com>
87

HISTORY

89       Written by Robert Elz <kre@munnari.oz.au>, flags  added  by  Rich  $alz
90       <rsalz@uunet.uu.net>.  This is revision 5909, dated 2002-12-03.
91

SEE ALSO

93       buffchan(8), inn.conf(5), innd(8), newsfeeds(5).
94
95
96
97                                                                   FILECHAN(8)
Impressum