columnize

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2017 License: MIT Imports: 7 Imported by: 0

README

columnize

Like column, but right justifies columns that are all numbers.

Usage

columnize < input

By default this program inspects fields for every line to determine max field width and whether the field is numerical. By default numerical fields are right justified and non-numerical fields are left justified.

Ignore Header

When the -h command line option is provided this program still uses the first line of input for column width determination, but ignores the fields in the first line when determining whether the column is numerical.

Left Justify

When the -l command line option is provided, all columns will be left justified.

columnize -l input.txt
Right Justify

When the -r command line option is provided, all columns will be right justified.

columnize -r input.txt

Specifying a Delimiter

By default this program splits each line by whitespace. When the -d S command line option is given, it uses the provided string as the field delimiter. S may be a string of multiple characters.

columnize -d : input.txt

Installation

If you don't have the Go programming language installed, then you'll need to install a copy from https://golang.org/dl.

Once you have Go installed:

go get github.com/karrick/columnize

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL