Next: , Previous: , Up: Invoking the Utilities   [Contents][Index]


17.4 Invoking recdel

recdel removes records from a rec file, or from rec data read from standard input. Synopsis:

recdel [OPTIONS]… [-t type] \
       [-n indexes | -e record_expr | -q str | -m num] \
       [file]

If no file is specified then the command acts like a filter, getting the data from standard input and writing the result to standard output.

In addition to the common options described earlier (see Common Options) the program accepts the following options.

-t
--type=expr

Remove records of the given type. If this parameter is not specified then records of any type will be removed.

-n indexes
--number=indexes

Match the records occupying the given positions in its record set. indexes must be a comma-separated list of numbers or ranges, the ranges being two numbers separated with dashes. For example, the following list denotes the first, the third, the fourth and all records up to the tenth: -n 0,2,4-9.

-e record_expr
--expression=expr

A record selection expression (see Selection Expressions). Only the records matched by the expression will be removed from the file.

-q str
--quick=str

Remove records having a field whose value contains the substring str.

-m num
--random=num

Remove num random records. If num is zero then remove all the records.

-c
--comment

Comment the matching records out instead of removing them.

--force

Delete even in potentially dangerous situations, such as a request to delete all the records of some type.

--no-external

Don’t use external record descriptors.

-i
--case-insensitive

Make strings case-insensitive in selection expressions.

--verbose

Be verbose when reporting integrity problems.


Next: , Previous: , Up: Invoking the Utilities   [Contents][Index]