LOGWATCH-EXEC(1) LOGWATCH-EXEC(1) NAME logwatch-exec - execute a program, from a partial key database, when the log file is appended. SYNOPSIS logwatch-exec -d dbfilename -l logfilename [-f n] [-V] [-v] DESCRIPTION Logwatch-exec is for executing a program, from a partial key database, when the log file is appended. When the log file, a record oriented text file with tab delimited field(s) in each record, (specified by the -l logfilename argument,) has record(s) appended, the record(s) are parsed, and the key field, (specified with the -f n argument, n = 0 is the first field,) is used for a partial key search of the first field of each record in the database file, (specified with the -d argument); if a match is found, the command specified in the database record is executed. In addition, there are two internal commands: 1) enable, (the default,) which enables external command execution. 2) disable, which disables eternal command execution. The database file is a lexically ordered, (using, perhaps, sort(1),) text file with each record containing exactly two fields: the first is expected to, (possibly,) match the key field from the log file; the second is the command to execute if a match for that key is found. The two fields are delimited by a single tab character. The database file is opened with mmap(2), and binary searched. OPTIONS -d dbfilename Database filename. -f n Log file field number for partial key match, (0). -l logfilename Log file name. -V Verbose mode. -v Print the version and copyright banner of the program. AUTHORS ---------------------------------------------------------------------- A license is hereby granted to reproduce this software source code and to create executable versions from this source code for personal, non-commercial use. The copyright notice included with the software must be maintained in all copies produced. THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY. Copyright (c) 1994-2007, John Conover, All Rights Reserved. Comments and/or bug reports should be addressed to: john@email.johncon.com (John Conover) ---------------------------------------------------------------------- September 9, 2007 LOGWATCH-EXEC(1)