lmerge.1.md (1390B)
1 % lmerge(1) lmerge manpage 2 % BĂ©renger Morel 3 % 2020-02-25 4 5 # NAME 6 7 *lmerge* - merges entries with common fields 8 9 # SYNOPSIS 10 11 `cat foo | *lmerge*` 12 13 # DESCRIPTION 14 15 Merges consecutive entries when they share a common field. 16 Entries are read from stdin. 17 18 *lmerge* does not remove duplicated fields. 19 20 # OPTIONS 21 22 Options can be managed either with traditional command-line parameters or via 23 environment variables. 24 List of environment variables that affect behavior: 25 26 FIELDS 27 28 : list of indexes (starting from 0, separated with **commas** (\',\', 0x2C) of 29 the fields that will be compared. 30 31 FIELD_SEP 32 33 : list of characters that will be considered as field separators. 34 Defaults to **space** (\' \', 0x20) and **horizontal tabulation** (\'\\t\', 0x09). 35 36 ENTRY_SEP 37 38 : list of characters that will be considered as entry separators. 39 Defaults to **newline** (\'\\n\', 0x0A). 40 41 For more details, use the '--help' commutator. 42 43 # EXAMPLE 44 45 This invocation: 46 47 ```sh 48 FIELD_SEP=": \t" FIELDS="1,3" ./lmerge <<EOF 49 0 foo:hello:1 50 1 bar:hello:2 51 2:foo:world:3 52 2:bar:world:4 53 EOF 54 ``` 55 56 will generate this result: 57 58 ``` 59 0 foo:hello:1 60 1 bar:hello:2 61 2:foo:world:3: 2:bar:world:4 62 ``` 63 64 If the feature was enabled, lmerge could have been summoned like this 65 `./lmerge -t': \t' -f1,3 ` instead of 66 `FIELD_SEP=": \t" FIELDS="1,3" ./lmerge` 67 68 # BUGS 69 70 Multi-byte characters can not be used for FIELD_SEP and ENTRY_SEP. 71 72 # SEE ALSO