table

Помоћни програм из командне линије за форматирање и приказ CSV-а
git clone https://git.sr.ht/~strahinja/table
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 75bee5fc24108d794a4ed5ff648a346d3874162f
родитељ b2af00af58f024cad255fcf92a530c9fac414ca7
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Mon,  6 May 2024 21:39:13 +0200

README,table.1.in: Mention TSV, add note about ls(1) example to README

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
MREADME | 7+++++--
Mtable.1.in | 13++++++++-----
измењених датотека: 2, додавања: 13(+), брисања: 7(-)

diff --git a/README b/README @@ -1,7 +1,7 @@ table ===== -Command line utility to format and display CSV. +Command line utility to format and display CSV and TSV. For installation instructions, see the file INSTALL. @@ -10,7 +10,7 @@ Examples -------- Periodically display CPU load information in a single-line table (requires a -mounted Linux-style /proc file system) +mounted Linux-style /proc file system and GNU watch(1)) $ watch "table /proc/loadavg -d ' ' -c 50 -n -s ss" @@ -19,6 +19,9 @@ single-line column divisors $ LC_ALL=C ls -l | tail -n +2 | sed -E 's/ +/ /g' | table -d ' ' -n +Caution: format of ls(1) is not standardized, so this example might not work as +intended. + Print information from /etc/passwd in a table: $ table -n -d : -f 3:1:1:1:4:4:4 /etc/passwd diff --git a/table.1.in b/table.1.in @@ -6,7 +6,7 @@ .Os .Sh NAME .Nm table -.Nd Command line utility to format and display CSV +.Nd Command line utility to format and display CSV and TSV .Sh SYNOPSIS .Nm .Fl h | \-help | Fl V | \-full\-version | Fl v | \-version @@ -27,7 +27,7 @@ .Oo Fl y | Fl \-yes\-ansi Oc .Op Ar pathname .Sh COMMAND ALIASES -.Bl -inset +.Bl -inset -compact .It Nm tablep is a synonym for .Ql "table -p" . @@ -38,9 +38,11 @@ is a synonym for . .Sh DESCRIPTION .Nm -is a command line utility to format and display CSV. -It parses the given file or standard input as CSV and prints out a table using -Unicode characters for box drawing. +is a command line utility to format and display CSV and TSV. +It parses the file given by +.Ar pathname +or standard input as CSV and prints out a table using Unicode characters for box +drawing. .Pp When specifying multiple .Ar pathname @@ -260,6 +262,7 @@ single\-line column divisors .Bd -literal -offset 0 $ LC_ALL=C ls -l | tail -n +2 | sed -E 's/ +/ /g' | table -d ' ' -n .Ed +.Pp Caution: format of .Xr ls 1 is not standardized, so this example might not work as intended.