Skip to content

chain

Creates an in-memory chain of recs operations.

Synopsis

bash
recs chain <command> | <command> | ...

Description

Creates an in-memory chain of recs operations. This avoids serialization and deserialization of records at each step in a complex recs pipeline. Arguments are specified on the command line separated by pipes. For most shells, you will need to escape the pipe character to avoid having the shell interpret it as a shell pipe.

Options

FlagDescription
--show-chainBefore running the commands, print out what will happen in the chain.
--dry-run / -nDo not run commands. Implies --show-chain.

Examples

Parse some fields, sort and collate, all in memory

bash
recs chain frommultire 'data,time=(\S+) (\S+)' \| sort --key time=n \| collate --a perc,90,data

Use shell commands in your recs stream

bash
recs chain frommultire 'data,time=(\S+) (\S+)' \| sort --key time=n \| grep foo \| collate --a perc,90,data

See Also

Released under the MIT License.