Files
tldr/pages.zh/common/recsel.md

16 lines
505 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# recsel
> 从recfile打印记录一个可人编辑的纯文本数据库。
> 更多信息:<https://www.gnu.org/software/recutils/manual/recutils.html>。
- 提取名称和版本字段:
`recsel -p name,version {{data.rec}}`
- 使用"~"来匹配具有给定正则表达式的字符串:
`recsel -e "{{field_name}} ~ '{{regular_expression}}' {{data.rec}}"`
- 使用谓词匹配名称和版本:
`recsel -e "name ~ '{{regular_expression}}' && version ~ '{{regular_expression}}'" {{data.rec}}`