acol
Styles standard input in a tabular format like ls
.
Installation
Install Go and run this command:
go get github.com/snsinfu/acol
Now acol is placed in GOPATH/bin (which is ~/go/bin by default).
Testing
Move to the repository root (or ~/go/github.com/snsinfu/acol) and
go test ./...
Usage
acol reads list of lines and formats the list into multiple columns. Like this:
% head -n 30 /usr/share/dict/words | acol
A aam Aaronic Ab abaca abaciscus
a Aani Aaronical aba abacate abacist
aa aardvark Aaronite Ababdeh abacay aback
aal aardwolf Aaronitic Ababua abacinate abactinal
aalii Aaron Aaru abac abacination abactinally
Input may contain spaces and/or escape sequences (colored text):
Options
-h, --help display help information
-r use row-major ordering
-s[=2] space between columns
Alternatives
The column command works similarly to acol. However, it does not
handle colored text correctly. Also, the output of column is less packed than
that of acol because of uniform column width.