-->

Previous | Table of Contents | Next

Page 78

SEE ALSO
awk(1), column(1), expand(1), paste(1)

HISTORY

The colrm command appeared in BSD 3.0.

BSD 3, 14 March 1991

column

column—Columnate lists

SYNOPSIS


column [_tx] [_ccolumns] [_ssep] [...file]

DESCRIPTION

The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored.

The options are as follows:

_c Output is formatted for a display columns wide.
-s Specify a set of characters to be used to delimit columns for the -t option.
-t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays.
-x Fill columns before filling rows.

Column exits 0 on success, >0 if an error occurred.

ENVIRONMENT

The environment variable COLUMNS is used to determine the size of the screen if no other information is available.

EXAMPLES


(printf "PERM LINKS OWNER SIZE MONTH DAY HH:MM/YEAR NAME"; ls -l j sed 1d) j column -t

SEE ALSO

colrm(1), ls(1), paste(1), sort(1)

HISTORY

The column command appeared in BSD 4.3 Reno.

6 June 1993

comm

comm—Compare two sorted files line by line

SYNOPSIS

comm [_123] [—help] [—version] file1 file2

Page 79

DESCRIPTION

This manual page documents the GNU version of comm. comm prints lines that are common, and lines that are unique, to two input files. The two files must be sorted before comm can be used. The filename _ means the standard input.

With no options, comm produces three column output. Column one contains lines unique to file1, column two contains lines unique to file2, and column three contains lines common to both files.

OPTIONS

The options _1, _2, and _3 suppress printing of the corresponding columns.

—help Print a usage message and exit with a nonzero status.
—version Print version information on standard output then exit.

GNU Text Utilities

convdate

convdate—Convert time/date strings and numbers

SYNOPSIS


convdate [ _c ][_n ][_s ] arg...

DESCRIPTION

convdate translates the date/time strings specified as arguments on its command line, outputting the results one to a line.

If the _s flag is used, then each argument is taken as a date string to be parsed by parse-date(3) and is output as a string formatted by ctime(3). This is the default.

If the _n flag is used, then each argument is converted the same way but is output as a time t; see time(2).

If the _c flag is used, then each argument is taken to be a time t and is output in ctime format.

Here's an example:


% convdate `feb 10 10am'

Sun Feb 10 10:00:00 1991



% convdate 12pm 5/4/90

Fri Dec 13 00:00:00 1991

Fri May 4 00:00:00 1990



% convdate -n `feb 10 10am' '12pm 5/4/90'

666198000

641880000

% convdate -c 666198000

Sun Feb 10 10:00:00 1991

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net).

SEE ALSO

parsedate(3)

Page 80

cp

cp—Copy files

SYNOPSIS


cp [options] source dest

cp [options] source... directory

Options:


[_abdfilprsuvxPR] [_S backup-suffix] [_V fnumbered,existing,simpleg] [—backup]

[—no-dereference] [—force] [—interactive] [—one-file-system] [—preserve]

[—recursive][—update] [—verbose] [—suffix=backup-suffix]

[—version-control=fnumbered,existing,simpleg] [—archive] [—parents] [—link]

[—symbolic-link] [—help] [—version]

DESCRIPTION

This manual page documents the GNU version of cp. If the last argument names an existing directory, cp copies each other given file into a file with the same name in that directory. Otherwise, if only two files are given, it copies the first onto the second. It is an error if the last argument is not a directory and more than two files are given. By default, it does not copy directories.

OPTIONS

_a, —archive Preserve as much as possible of the structure and attributes of the original files in the copy. The same as _dpR.
_b, —backup Make backups of files that are about to be overwritten or removed.
_d, —no-dereference Copy symbolic links as symbolic links rather than copying the files that they point to, and preserve hard link relationships between source files in the copies.
_f, —force Remove existing destination files.
-i, —interactive Prompt whether to overwrite existing regular destination files.
_l, —link Make hard links instead of copies of nondirectories.
_P, —parents Form the name of each destination file by appending to the target directory a slash and the specified name of the source file. The last argument given to cp must be the name of an existing directory. For example, the command cp —parents a/b/c existing_dir copies the file a/b/c to existing_dir/a/b/c, creating any missing intermediate directories.
_p, —preserve Preserve the original files' owner, group, permissions, and timestamps.
-r Copy directories recursively, copying all nondirectories as if they were regular files.
_s, —symbolic-link Make symbolic links instead of copies of nondirectories. All source filenames must be absolute (starting with /) unless the destination files are in the current directory. This option produces an error message on systems that do not support symbolic links.
_u, —update Do not copy a nondirectory that has an existing destination with the same or newer modification time.
_v, —verbose Print the name of each file before copying it.
_x, —one-file-system Skip subdirectories that are on different filesystems from the one that the copy started on.
_R, —recursive Copy directories recursively.
—help Print a usage message on standard output and exit successfully.
—version Print version information on standard output then exit successfully.
_S, —suffix backup-suffix The suffix used for making simple backup files can be set with the SIMPLE_BACKUP_SUFFIX environment variable, which can be overridden by this option. If neither of those is given, the default is ~, as it is in emacs.

Previous | Table of Contents | Next