| spoolprocess - process files in a spool directory |
spoolprocess - process files in a spool directory
spoolprocess [OPTIONS] -d DIRECTORY
Take all files in DIRECTORY specified by -d option,
group them by their basename, ie. name without an optional "dot + number" suffix
(.1, .2, ..., also known as version number),
and call /etc/spoolprocess/BASENAME > programm for each group to handle each files.
The handler programm (usually a script) gets the spool file's path as an argument.
If the programm succeeds, spoolprocess(1) deletes the files for which the handler script was successful,
or all files in the group if --latest asked and it was successful.
This option is repeatable.
Process only those files with BASENAME. This option is repeatable.
Process only the latest (highest version number) file in each group. The default is to process all files in ascending order of version numbers.
Lookup programms in DIR instead of /etc/spoolprocess. This option is repeatable.
Prepend COMMAND to handler scripts found in --scriptdir. COMMAND is tokenized by whitespaces. So -w "bash -x" makes script invoked like this for example:
bash -x /etc/spoolprocess/something spooldir/something.1
spoolprocess(1) does not do locking.
Run it under flock(1), singleinstance(1), cronrun(1), or similar
if you deem it necessary.
DIRECTORY is scanned non-recursively.
uniproc(1)