ucs-print - ASCII-format UCS data set for viewing and printing
ucs-print [-i] [-p <lines>] [-d <digits>] data.ds.gz ucs-print [-o <file>] [-ps [-2] [-l]] [-p <lines>] [-d <digits>] data.ds.gz ucs-print [<options>] '*' 'am.%.pv' FROM data.ds.gz
Format data set as ASCII table for inclusion in text files, on-line viewing (in a terminal window, with --interactive
option), and printing (in PostScript format, with --postscript
option). The ucs-print utility automatically adjusts column widths and chooses an appropriate format for floating-point numbers. Boolean attributes are displayed as yes
and no
, while missing values are shown as NA
.
In the first forms of the command (used in the first two examples above), all variables are displayed (which usually results in a very wide table). The name of the data set may be omitted, in which case data is read from STDIN
.
In the second form, variables can be selected with a whitespace-separated list of UCS wildcard patterns (see the ucsexp manpage) or by explicitly specifying the variable names. This feature can also be used to re-order the columns or display a variable in multiple columns. The FROM
clause is mandatory in this mode, but data can be read from STDIN
by using -
as the name of the data set.
Note that there may be some delay while the data set is read into memory and analysed, especially without the --pagesize
option.
--help
, -h
Prints short usage reminder.
--verbose
, -v
Prints some (minimal) progress information on STDERR
.
--output
file, -o
file
Write output to file, rather than printing it on STDOUT
.
--postscript
, -ps
Uses the a2ps program (see the a2ps(1) manpage) to create a PostScript version of the formatted table for printing. By default, the PostScript code will be shown on STDOUT
(and not be sent to a printer). It can be saved into a file with the --output
option. If the --pagesize
option is used, each page will contain the specified number of rows and the table will be truncated if it is too wide. If this happens, try increasing the number of rows on the page or use --landscape
. If the table still fails to fit, split the variables into two or more groups that are printed separately.
--landscape
, -l
[In --postscript
mode only.] Print pages in landscape orientation rather than portrait. Especially useful for wide tables.
--two-up
, -2
[In --postscript
mode only.] Print two pages on a single sheet, same as the -2
option in a2ps. This option may give a more satisfactory result for very narrow tables (e.g. when showing only the pair types).
--interactive
, -i
Send output to terminal pager (less) for interactive viewing. This option may not be used together with --output
. The data will automatically be displayed in paged mode, with the page size adjusted to the height of the terminal window. If the screen size cannot be automatically determined, use the --pagesize
option to activate paging explicitly. The page size should be set to the screen height (number of text lines) minus 4 for optimal results. Use -p 0
to deactivate paging in interactive mode.
--pagesize
n, -p
n
Split data set into smaller tables of (up to) n rows each, which are separated by blank lines. Use of this option may improve the formatting quality, helps to avoid excessive columns widths, and reduces the delay before (partial) results can be displayed (especially for large data sets). By default, the entire data set is formatted as a single large table (unless --interactive
was specified).
--digits
n, -d
n
Display floating-point numbers with a precision of approximately n significant digits. The actual number of digits shown may differ slightly when a fixed-point format is chosen by the formatter. The default is n = 8.
The code used to determine the screen height in --interactive
mode may not work on some platforms. It has only been tested under Linux so far. If you are using the bash shell, you might try export LINES
before running the ucs-print tool.
Copyright 2004 Stefan Evert.
This software is provided AS IS and the author makes no warranty as to its use and performance. You may use the software, redistribute and modify it under the same terms as Perl itself.