mount do not try ~/.fstab if --fstab is specified by the caller
[hband-tools.git] / tabdata / README.md
blob107fecd4066ac9352d30f875304c8af682604453
1 # Tabular Data management tools
3 Tabular Data program suit (Tabdata) is a set of CLI tools (`td-*`) to
4 manipulate line-based data stream (text).
5 Each line represent a data **row**, also known as **record**,
6 which consists of some **cells**,
7 which are just strings separated by TAB (`0x09`, `\t`) char.
8 This way each **cell** holds the **value** of a **field**.
9 **Field** is a bit abstract part of Tabdata,
10 it refers to either to a **cell** in a given column position determined by field name - when speaking of it in the context of a row,
11 or to a whole **column** when speaking about the whole data stream.
12 So **fields** make up the **columns** labelled by the field's name in the first **row**.
13 Which makes the first row effectively the **header**.
15 You guessed, newline and tab (`\n`, `\t`) chars can not be in the cells
16 as raw data, but need to encode/escape somehow.
17 See "Escaping" section below.
19 Objective of Tabdata is to provide user-friendly
20 (guru/admin/terminal-warrior/poweruser-friendly) means to do everyday data processing
21 tasks, complementing (not superseding) well-established toolsets:
22 use Tabdata in combination with coreutils, moreutils, util-linux, ...
23 tools.
25 Focus is on text as being primarily for humans, not machines.
26 That's why control chars are not considered meaningful data.
27 You still can encode/decode your data stream before/after piping into
28 Tabdata tools, to process arbitrary bytestream as well.
30 # Escaping
32 Escaping rules in Tabdata:
34  | Raw char  | Tabdata escape sequence |
35  |-----------|-------------------------|
36  | ESC       | Backslash + "e"         |
37  | TAB       | Backslash + "t"         |
38  | LF        | Backslash + "n"         |
39  | CR        | Backslash + "r"         |
40  | Backslash | Backslash + Backslash   |
42 ## Q. Why not use ESC control code (0x1B) instead of Backslash?
44 Tabdata tools are intended to write output to file, pipes, and terminals alike.
45 The ESC code is avoided because it's handled specially by terminals,
46 whereas Backslash is not.
48 ## Q. Why not escape the other control characters?
50 Feel yourself rather lucky that even these chars are escaped.
51 It would be better if you pre-filter or transform your input data
52 before passing it forward to Tabdata tools.
53 Tabdata does not do it for you, to prevent unneccessary computing
54 in cases where the user knows that the input data is good to go through as-is.
56 # Tool Descriptions
58 [descriptions.txt](descriptions.txt)
60 # Compare to CSV
62 Tabdata is very similar to CSV, except it has well-defined field- and record separators
63 and a well-defined encoding schema.
65 # Similar tools/projects
67 - GNU [datamash](https://www.gnu.org/software/datamash/) git://git.sv.gnu.org/datamash.git
68 - [vnlog](https://github.com/dkogan/vnlog)
69 - [tsv-utils](https://github.com/eBay/tsv-utils-dlang)
70 - [csvkit](https://github.com/wireservice/csvkit)
71 - [q](https://github.com/harelba/q) Run SQL directly on delimited files...
72 - [sqawk](https://github.com/dbohdan/sqawk)
74 # Accessory tools
76 - [tabularize](../user-tools/tabularize) - to display results nicely on terminal