DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T c

⟦54830fc2f⟧ TextFile

    Length: 2657 (0xa61)
    Types: TextFile
    Names: »colex.1«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/stat-5.3/eu/stat/man/colex.1« 

TextFile

.TH COLEX 1 "August 11, 1986" "\(co 1980 Gary Perlman" "|STAT" "UNIX User's Manual""
.SH NAME
colex \- column/field extraction/formatting
.SH SYNOPSIS
.B colex
[-fiqtv] [-F format] column numbers
.SH DESCRIPTION
.I colex
extracts the named columns from the standard input
and prints them with tabs between.
Column numbers begin with 1.
Ranges of column numbers can be abbreviated with arguments
of the form #-# (e.g., 12-24).
Column ranges can be in reverse order
(e.g., 5-1 to reverse the first five columns).
.PP
Optionally,
.I colex
will format output columns as integers, numbers with decimal points,
or as numbers in exponential (scientific) notation,
instead of the default of printing the columns as alphabetic fields.
A format specification
precedes the column range and is indicated by a single letter:
a (alphabetic), e (exponential), i (integer), and n (numeric).
Each format can be preceded by an optional width and/or a precision.
The width tells how wide the field should be.
The precision tells how many digits after the decimal point
should be printed for real numbers,
or the maximum width for alphabetic fields.
The general form is:
.br
	[[width][.precision]format][column range]
.br
See the examples for simple cases.
C programmers will recognize the format as that used by the
standard formatted printing functions.
.SH OPTIONS
.de OP
.TP
.B -\\$1 \\$2
..
.OP f
Force filling of missing columns
with the string NA.
.OP F format
By default, columns without type specifiers
are printed as alphabetic strings.
This option changes the default for all columns
for which the format is not explicitly specified.
.OP i
Ignore missing columns.
Otherwise, a missing column,
not filled by the -f option,
is an error.
.OP q
Place quotes around the printed strings.
.OP t
By default, there is a tab printed after every column.
This option turns off the tab printing.
.OP v
Validate data types in numerical columns.
If a numerical output format is requested,
validation will print warnings when a non-integer or non-number
is being printed as a number (usually as 0).
By default, no checking is done.
.SH EXAMPLES
.nf
.ta 2i
colex 1 2 3 4	# columns 1 through 4
colex 1-4	# an abbreviation of the above
colex 4-1	# columns 4-1 in reverse order
colex -i 100-1	# reverse the columns ignoring missing columns
colex 10.2n1-5	# columns 1-5, 10-wide, with 2 digits after decimal place
colex -F 10.2n 5-2	# columns 5-2 in 10.2n format
colex 4i1 5.2n2-3 10a4	# column 1 as a 4-wide integer,
	# columns 2-3 as 5-wide numbers with 2 decimal digits,
	# and column 4 as a 10-wide alphabetic string
.fi
.SH LIMITS
Use the -L option to determine the program limits.