Dextract - Selection by the record number list

[ English | Japanese ]

[visit D-home]

SYNOPSIS

Dextract [ -Fv ] record-number-list [ input-file.. ]

DESCRIPTION

Dextract selects records by the record-number-list, that is a comma separated list of record numbers or hyphened pair of record numbers. The latter form (n-m) means all record numbers r that is n<=r<=m. Therefore, m must be greater than or equal to n. In this form, n or m may be omitted. They are interpreted as "from the first record", or "to the last record".

Duplicate record number may be in the list. Record numbers need not be in ascending order. Union of all the record numbers in the list is in effect.

Record number of the input record starts from 1, and increase throughout the whole input files. But, when -F option is specified, record number is reset to 1 at the first record of each input file.

OPTIONS

-F
adds "filename" field to each output record; value is the input file name in the form of the command arguments after globbed by the shell. This field is not added when the input file is the standard input. The record number is reset to 1 at the first record of each input file.
-v
selects records not listed in the record-number-list.
-D [i/o]datautf=8|16|32
UTF I/O feature (see manual page of UTF I/O feature.)

FIXED NAME FIELDS

filename:
at the top of each record, when -F option is specified..

ENVIRONMENT

Ddatautf, Didatautf, Dodatautf
for UTF I/O feature.

EXAMPLES

Following commands are almost self-explaining:

Dextract 30
Dextract 1-10
Dextract -10
Dextract 11-
Dextract 2,5,8,11
Dextract 11-13,6-8,3,1
Dextract -F 1-10 *.d
Dextract -v 2,5,8

DIAGNOSTICS

See the manual of D_msg.

SEE ALSO

Dintro, Dhead, Dtail, Dselect, D_msg.

AUTHOR

MIYAZAWA Akira


miyazawa@nii.ac.jp
2003