Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

marc21-concat(1)

NAME

marc21-concat — Concatenate records from multiple inputs

SYNOPSIS

marc21 concat [options] [path]…
marc21 cat [options] [path]…

DESCRIPTION

The concat command is used to combine records from multiple files into a single file or output (stdout).

OPTIONS

-a, --append
Append to the given file, do not overwrite. This option is not supported when writing to Gzip compressed output. When writing to stdout this flag is ignored.
--tee <path>
Write to the output and the file <path> at the same time. This option can be particularly useful when the output is written to stdout for further processing in a pipeline, but the output is also needed for following processing step.

FILTER OPTIONS

-l, --limit <n>
Limit the result to first <n> records (a limit value 0 means no limit)
-s, --skip-invalid
Skip invalid records that can’t be decoded
--strsim-threshold
The minimum score for string similarity comparisons (0 <= score <= 100)
--where
An expression for filtering records
--filter-normalization <form>
Transliterate the given filter or query expression into the specified Unicode normal form. Possible values: nfd, nfkd, nfc, nfkc. This option can also be specified by setting the environment variable MARC21_FILTER_NORMALIZATION.

COMMON OPTIONS

-p, --progress
If set, show a progress bar
-c, --compression
Specify compression level (0..=9)

EXIT STATUS

  • 0 — Command succeeded.
  • 1 — Command failed.

EXAMPLES

In the following example, the five files dnb_all_dnbmarc.1.mrc.gz to dnb_all_dnbmarc.5.mrc.gz are concatenated into a single file DNB.mrc.gz. Invalid data records are skipped (option -s):

$ marc21 concat -s dnb_all_dnbmarc.*.mrc.gz -o DNB.mrc.gz