unbatch(8)

NAME
unbatch - unpack spooled news

SYNOPSIS
unbatch [-d] [ file ]

DESCRIPTION

The unbatch program is used to unpack the files that have been queued for further processing. If the file argument is given, that will be taken as the name of the file to unpack. Otherwise, unbatch scans the spool directory /usr/spool/news/.rnews or /var/spool/news/.incoming for processable files, and processes them one at a time. If the file is a compressed batch of articles (which is indicated by the presence of a #! cunbatch header line), it is first decompressed by routing it through the compress(1) program. The resulting batch is a normal batch of articles. Other formats (such as Gnu-Zipped batches) are also detected, this is documented in detail in the sendbatch(8) manual page.

If this indicator is not present, unbatch will check to see whether the (resulting) file is a single article or a batch of articles. This is indicated by the presence of a #! rnews XXXX header line, since a batch consists of a series of news articles concatenated together, separated by this header line. If the file is indeed a batch, it will be split into into separate articles. Each of these articles is fed as input to the inews(8) program for posting it on the local system.

Otherwise, it will treat the file as a single article, thus feeding it to the inews program as well.

This program creates a lock file LCK..unbatch in either /usr/lib/news or (on modern systems) /var/adm/news as soon as it starts running, to prevent multiple copies of it to run at the same time.

When the unbatch program finishes a batch of articles, it removes the file from the spool directory, after which it continues searching for other batches to process. If no more files are found, it removes the lock file and exits.

FILES
/usr/spool/news/.rnews/*

AUTHORS
Fred N. van Kempen, waltje@Infomagic.COM
Miquel van Smoorenburg, <miquels@drinkel.ow.org>
Udo Munk, udo@umunk.GUN.de (Coherent)