Linux Training

Linux training for private, public & voluntary sector.

0793 572 8612

City LinUX sample scripts - rmmr

NAME

rmmr - removes a record from a mailout data file.

SYNOPSIS

rmmr [ -c <config_file> ] [ -d ] [ -v ] <name> | [ -V ]

AVAILABILITY

rmmr is a Bourne shell script and should work equally well on all versions of UNIX, Linux and Mac OS X.

DESCRIPTION

The script rmmr searches for " name " in the mailout source data file and provided that only one match is found copies the record to the source " deleted " file. The record is then removed from the source data file. RCS is used to track the changes. Finally the production copies of the " data " and " deleted " files are updated.

OPTIONS

-c <config_file> The default configuration file is /src/< hostname >/usr/local/etc/mailout.cf . This may be changed on the command line by using the -c    option.

-d    Set debug mode on. The script will report its progress to screen as it runs.

-v    Set the operation mode of the script to verbose.

-V    prints the " rmmr " release details and terminates.

EXAMPLES

rmmr -v  jonathan

Searches for the string "jonathan" in the source data file. If more than one match is found a warning is written to standard error and the script terminates.

If a single match is found a copy of the data record is appended to the "deleted" file and removed from the source "data" file.

The RCS records are updated for both files and then the production files are also modified.

BUGS

Not really bugs but the script has very little input error checking.

FILES

/usr/local/etc/mailout.cf.

SEE ALSO

mailout.

AUTHOR

Clifford W Fulford, City Linux. Contact fulford@fulford.net or +44 (0)709 229 5385.


The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.