← 返回命令列表

Linux command

recfmt 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Format records with inline template

recsel [file.rec] | recfmt "{{Name}}: {{Email}}"

Format records using a template file

recsel [file.rec] | recfmt -f [template.fmt]

Select and format specific record type

recsel -t [Type] [file.rec] | recfmt "{{Title}} by {{Author}}"

说明

recfmt applies a template to records read from standard input. Fields are referenced using double-brace slots like {{FieldName}}. For each input record, one copy of the template is generated with field values substituted. Typically used by piping output from recsel into recfmt. Part of GNU recutils.

参数

-f, --file _FILENAME_
Load the template from a file instead of a command-line argument.
--help
Print help and exit.
--version
Show version and exit.

FAQ

What is the recfmt command used for?

recfmt applies a template to records read from standard input. Fields are referenced using double-brace slots like {{FieldName}}. For each input record, one copy of the template is generated with field values substituted. Typically used by piping output from recsel into recfmt. Part of GNU recutils.

How do I run a basic recfmt example?

Run `recsel [file.rec] | recfmt "{{Name}}: {{Email}}"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --file _FILENAME_ do in recfmt?

Load the template from a file instead of a command-line argument.