From 386a66cc9d130ca4af845c5a3cfaa02f2cc781d9 Mon Sep 17 00:00:00 2001 From: kidpixo Date: Thu, 22 Sep 2016 16:20:03 +0200 Subject: [PATCH] column: add page (#1053) --- pages/common/column.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/column.md diff --git a/pages/common/column.md b/pages/common/column.md new file mode 100644 index 0000000000..55c4c80e98 --- /dev/null +++ b/pages/common/column.md @@ -0,0 +1,20 @@ +# column + +> Format standard input or file into multiple columns. +> Rows are filled before columns; default separator is whitespace. + +- Format output for a 30 characters wide display: + +`printf "header1 header2\nbar foo\n" | column -c {{30}}` + +- Specify column delimiter character for the -t option (i.e. "," for csv); default is whitespace: + +`printf "header1,header2\nbar,foo\n" | column -s{{,}}` + +- Split columns automatically and auto-align in a tabular format: + +`printf "header1 header2\nbar foo\n" | column -t` + +- Fill columns before filling rows: + +`printf "header1\nbar\nfoobar\n" | column -c {{30}} -x`