c

produce multi-column output 

Command


SYNOPSIS

c [-hVv ] [-g gutterwidth] [-w pagewidth] [file ...]


DESCRIPTION

The c command reads lines from each input file, or from standard input if no file is specified. c produces multi-column output from this input. It places as many input lines across the page as fit in the prescribed width, including a gutter between adjacent columns.

Options

-g gutterwidth 

specifies a gutterwidth measured in characters. The default gutterwidth is two characters.

-h 

orders input lines from left to right, horizontally. This is the default.

-V 

balances the columns so that they are all the same length, or as close as possible.

-v 

orders input lines vertically down the columns.

-w pagewidth 

specifies the width of the entire page, in characters. The default pagewidth is 80 characters. If you do not set the width with the -w option, c checks to see if the environment variable COLUMNS is set. If so, c uses its value as the pagewidth, in characters. For example, if you are using the MKS KornShell:

export COLUMNS=132

sets a pagewidth of 132 characters. If you are using cmd.exe, you can do the same thing with:

set COLUMNS=132


EXAMPLES

Try the following to see the effect of these variants of the command:

ls ROOTDIR/bin | c
ls ROOTDIR/bin | c -v
ls ROOTDIR/bin | c -V

ENVIRONMENT VARIABLES

COLUMNS 

used as the page width if you do not specify the -w option.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following:

— an invalid command line argument
— insufficient memory
— inability to open the input file


PORTABILITY

Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016. Some UNIX systems.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
ls, pr


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.