Recutils
| GNU Recutils | |
|---|---|
| Original author | Jose E. Marchesi |
| Initial release | December 3, 2010 |
| Stable release | 1.9
/ April 16, 2022[1] |
| Written in | C |
| License | GNU General Public License |
| Website | www |
| Repository | git |

Recutils, from GNU Project, is a free command-line toolset for performing basic relational database operations on plain text files[2][3] – including field typing, auto-increment, and join. Storage files – known as recfiles – conform to a file format defined by the toolset. As plain text, recfiles can be edited via a text editor (as long it supports the character encoding). Various other software libraries support the format.[4][5][6]
A recfile is a text file with empty lines between records. Each field of a record is a line starting with the field name and a colon. Multiple record types can be in a single file. A long line can be wrapped (i.e. for readability).
Fields can be marked as mandatory and also have their value limited to a set of predefined values.
Tools include:
- recsel – Search for and print fields from records matching a query
- recins – Insert a record, or replace existing records
- recdel – Delete a record, or delete a set of records
- recfix – Sort records
- recset – Add or update individual fields
Example
The following is formatted as a recfile.
%rec: Text
%type: Year int
Author: Doug McIlroy
Year: 1964
Note: The Origin of Unix Pipes
Title: Unix Text Processing
Author: Dale Dougherty
Author: Tim O'Reilly
Year: 1987
Publisher: Hayden Books
Author: William Shakespeare
Title: Hamlet
Year: 1599
Year: 1600
Year: 1601
The following command selects records where a year field is greater than 1900 and outputs the author field values. The first two records have a year greater than 1900 so are selected. The first record has a single author and the second has two, so the result is three author names.
$ recsel -e 'Year > "1900"' -p Author
Author: Doug McIlroy
Author: Dale Dougherty
Author: Tim O'Reilly
See also
- asciidoc – Human-readable document format
- Flat-file database – Database stored as flat data
- org-mode – Open source mode for GNU Emacs
- TOML – Configuration file format
References
- ^ "Index of /gnu/recutils". ftp.gnu.org. Retrieved 11 April 2023.
- ^ "GNU Recutils". www.gnu.org. Retrieved 3 January 2025.
- ^ James Tomasino (2020-01-26). "GNU Recutils". Retrieved 2020-02-09.
- ^ František Kučera (2019-04-08). "Relational pipes and GNU Recutils".
- ^ "Python-recutils". GitHub. 12 January 2022.
- ^ "Aisamanra/Rrecutils". GitHub. 13 January 2022.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.