% PRINT-TABLE(1) Version 3.2.3 | Scripts Documentation % Georg Voell - georg.voell@standby.cloud % (c)2024 Standby.cloud NAME ==== **print-table** - (BASH Script) Reads a tab separated values file (tsv) and pretty prints it. SYNOPSIS ======== | **print-table** \[_options_] \[_keys_] DESCRIPTION =========== Reads a tab separated values file (tsv) and pretty prints it. First row (header) should contain the keys - all other rows are the values for the keys. Options ------- -h, \--help          : Displays helptext. -v, \--version          : Displays the version of the script. -q, \--quiet          : Just write error message to LOGFILE. -o, \--output _string_          : Output format: _string_ can be "table" (default), "line", "etsv", "tsv", "csv", "json", "keys" or "plain". -i, \--import _string_          : Read from a file (_string_ = filename) - if not specified, read from stdin. -g, \--green _string_          : If _string_ is the same as column, display it green. -y, \--yellow _string_          : If _string_ is the same as column, display it yellow. -r, \--red _string_          : If _string_ is the same as column, display it red. -d, \--darkgray _string_         : If _string_ is the same as column, display it gray. -b, \--bold _string_          : If _string_ is the same as column, display it bold. Keys ------- Optional - Select the keys you want to display. Use a tab (default) or comma separated string for keys. Colored output only used with output set to "table" or "line". ------- Colored output only used with output set to "table" or "line". JSON output is always enveloped with "content" and amount of items (contentItems). Disable this via 'export ENVELOPE_TABLE=false' ------- JSON output is always enveloped with "content" and amount of items (contentItems). Disable this via 'export ENVELOPE_TABLE=false' EXAMPLES ======== printf "cmd vers os jq 1.6 linux rclone 1.51.0 linux " | **print-table** : Displays: : cmd vers os : ------ ------ ----- : jq 1.6 linux : rclone 1.51.0 linux EXIT CODES ========== 01: Unknown or wrong parameter. 02: No file and empty stream 03: File is empty or specified keys not found. 99: User interrupt. SEE ALSO ======== **print-header**(1), **install-scripts**(1)