Strings of the form $ keyword $ and $ keyword : ... $ embedded in the text are replaced with strings of the form $ keyword
: value $, where keyword and value are pairs in the following list. Keywords can be embedded in literal strings or comments to identify a revision.
Initially, the user enters strings of the form $keyword$. On checkout, co replaces these strings with strings of the form
$keyword : value$. If a revision containing strings of the latter form is checked back in, the value fields will be replaced during the next checkout. Thus, the keyword values are automatically updated on checkout. This automatic substitution can be modified by the –k options.
Keywords and their corresponding values:
$Author$ The login name of the user who checked in the revision.
$Date$ The date and time the revision was checked in. With –zzone, a numeric time zone offset is appended; otherwise, the date is UTC.
$Header$ A standard header containing the full pathname of the RCS file, the revision number, the date and time, the author, the state, and the locker (if locked). With –zzone, a numeric time zone offset is appended to the date; otherwise, the date is UTC.
$Id$ Same as $Header$, except that the RCS filename is without a path.
$Locker$ The login name of the user who locked the revision (empty if not locked).
$Log$ The log message supplied during checkin, preceded by a header containing the RCS filename, the revision number, the author, and the date and time. With –zzone a numeric time zone offset is appended; otherwise, the date is UTC. Existing log messages are not replaced. Instead, the new log message is inserted after $Log: ... $ . This is useful for accumulating a complete change log in a source file.
Each inserted line is prefixed by the string that prefixes the $Log$ line. For example, if the $Log$ line is // $Log: tan.cc $,
RCS prefixes each line of the log with //. This is useful for languages with comments that go to the end of the line. The convention for other languages is to use a * prefix inside a multiline comment. For example, the initial log comment of a C program conventionally is of the following form:
/* * $Log$ */
For backwards compatibility with older versions of RCS, if the log prefix is /* or (* surrounded by optional whitespace, inserted log lines contain a space instead of / or (; however, this usage is obsolescent and should not be relied on.
$Name$ The symbolic name used to check out the revision, if any. For example, co -r Joe generates $Name: Joe $. Plain co generates just $Name: $.
$RCSfile$ The name of the RCS file without a path.
$Revision$ The revision number assigned to the revision.
$Source$ The full pathname of the RCS file.
$State$ The state assigned to the revision with the –s option of rcs(1) or ci(1).
The following characters in keyword values are represented by escape sequences to keep keyword strings well-formed.
Character Escape Sequence
tab \t newline \n space \040 $ \044 \ \\
FILE MODES
The working file inherits the read and execute permissions from the RCS file. In addition, the owner write permission is turned on, unless –kv is set or the file is checked out unlocked and locking is set to strict; see rcs(1).
If a file with the name of the working file exists already and has write permission, co aborts the checkout, asking beforehand if possible. If the existing working file is not writable or –f is given, the working file is deleted without asking.
FILES
co accesses files much as ci(1) does, except that it does not need to read the working file unless a revision number of $ is specified.
ENVIRONMENT
RCSINIT Options prepended to the argument list, separated by spaces. See ci(1) for details.
DIAGNOSTICS
The RCS pathname, the working pathname, and the revision number retrieved are written to the diagnostic output. The exit status is zero if and only if all operations were successful.
IDENTIFICATION
Author: Walter F. Tichy.
Manual Page Revision: 5.13; Release Date: 1995/06/01. Copyright 1982, 1988, 1989 Walter F. Tichy.
Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
SEE ALSO
rcsintro(1), ci(1), ctime(3), date(1), ident(1), make(1), rcs(1), rcsclean(1), rcsdiff(1), rc-smerge(1), rlog(1), rcsfile(5) Walter F. Tichy, “RCS—A System for Version Control,” Software Practice & Experience 15, 7 (July 1985), 637-654.
LIMITS
Links to the RCS and working files are not preserved.
There is no way to selectively suppress the expansion of keywords, except by writing them differently. In nroff and troff, this is done by embedding the null-character \& into the keyword.
col
col—Filter reverse line feeds from input
SYNOPSIS
col [-bfx] [-l num]
DESCRIPTION
col filters out reverse (and half-reverse) line feeds so the output is in the correct order with only forward and half-forward line feeds, and replaces whitespace characters with tabs where possible. This can be useful in processing the output of
nroff(1) and tbl(1). col reads from standard input and writes to standard output. The options are as follows:
-b Do not output any backspaces, printing only the last character written to each column position.
-f Forward half-line feeds are permitted (fine mode). Normally characters printed on a half-line boundary are printed on the following line.
-x Output multiple spaces instead of tabs.
-lnum Buffer at least num lines in memory. By default, 128 lines are buffered.
The control sequences for carriage motion that col understands and their decimal values are listed in the following table:
Control Sequence Decimal Value
Esc+7 Reverse line feed (escape then 7) Esc+8 Half-reverse line feed (escape then 8) Esc+9 Half-forward line feed (escape then 9)
Backspace Moves back one column (8); ignored in the first column Carriage return (13)
Newline Forward line feed (10); also does carriage return Shift in Shift to normal character set (15)
Shift out Shift to alternate character set (14) Space Moves forward one column (32) Tab Moves forward to next tab stop (9) Vertical tab Reverse line feed (11)
All unrecognized control characters and escape sequences are discarded.
col keeps track of the character set as characters are read and makes sure the character set is correct when they are output. If the input attempts to back up to the last flushed line, col will display a warning message.
SEE ALSO
expand(1), nroff(1), tbl(1)
HISTORY
A col command appeared in version 6 AT&T UNIX.
colcrt
colcrt—Filter nroff output for CRT previewing
SYNOPSIS
colcrt [–] [–2] [file ...]
DESCRIPTION
colcrt provides virtual half-line and reverse-line feed sequences for terminals without such capability, and on which overstriking is destructive. Half-line characters and underlining (changed to dashing –) are placed on new lines in between the normal output lines.
Available options:
– Suppress all underlining. This option is especially useful for previewing all boxed tables from tbl(1).
–2 Causes all half-lines to be printed, effectively double spacing the output. Normally, a minimal space output format is used which will suppress empty lines. The program never suppresses two consecutive empty lines, however. The -2 option is useful for sending output to the line printer when the output contains superscripts and subscripts that would otherwise be invisible.
EXAMPLES
A typical use of colcrt would be
tbl exum2.n | nroff -ms | colcrt - | more
SEE ALSO
nroff(1), troff(1), col(1), more(1), ul(1)
BUGS
Should fold underlines onto blanks even with the - option so that a true underline character would show. Can’t back up more than 102 lines.
General overstriking is lost; as a special case | overstruck with ‘’ or underline becomes +. Lines are trimmed to 132 characters.
Some provision should be made for processing superscripts and subscripts in documents that are already double-spaced.
HISTORY
The colcrt command appeared in BSD 3.0.
BSD 3, 30 June 1993
colrm
colrm—Remove columns from a file
SYNOPSIS
colrm [startcol [endcol]]
DESCRIPTION
colrm removes selected columns from a file. Input is taken from standard input. Output is sent to standard output.
If called with one parameter, the columns of each line will be removed starting with the specified column. If called with two parameters, the columns from the first column to the last column will be removed.
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
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 ([email protected]).
SEE ALSO
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.
–V, —version-control The type of backups made can be set with the VERSION_CONTROL environment variable, which
{numbered,existing,simple} can be overridden by this option. If VERSION_CONTROL is not set and this option is not given, the default backup type is existing. The value of the VERSION_CONTROL environment variable and the argument to this option are like the GNU emacsversion- control variable; they also recognize synonyms that are more descriptive. The valid values are (unique abbrevia- tions are accepted) the following:
t or numbered Always make numbered backups
nil or existing Make numbered backups of files that already have them, simple backups of the others
never or simple Always make simple backups
cccp, cpp
cccp, cpp—The GNU C-compatible compiler preprocessor
SYNOPSIS
cccp [–$][–A predicate [( value )]] [ –C ][–D name [ = definition ]] [–dD][–dM][–I\ directory ][–H ][–I– ][–imacros file ][–
include file ][–idirafter dir ][–iprefix prefix ][–iwithprefix dir ] [ –lang–c][–lang–c++][–lang–objc ][–lang–objc++ ][–lint ][– M[–MG ]] [ –MM[–MG ]] [ –MD file ][–MMD file ][–nostdinc ] [ –nostdinc++][–P][–pedantic ][–pedantic–errors ][–traditional ] [ –trigraphs ][–U name ][–undef ][–Wtrigraphs ][–Wcomment ] [ –Wall ][–Wtraditional ]
[ infile |– ][ outfile |– ]
DESCRIPTION
The C preprocessor is a macro processor that is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define macros, which are brief abbreviations for longer constructs.
The C preprocessor provides four separate facilities that you can use as you see fit:
■ Inclusion of header files. These are files of declarations that can be substituted into your program.
■ Macro expansion. You can define macros, which are abbreviations for arbitrary fragments of C code, and then the C preprocessor will replace the macros with their definitions throughout the program.
■ Conditional compilation. Using special preprocessing directives, you can include or exclude parts of the program according to various conditions.
■ Line control. If you use a program to combine or rearrange source files into an intermediate file which is then compiled, you can use line control to inform the compiler of where each source line originally came from.
C preprocessors vary in some details. For a full explanation of the GNU C preprocessor, see the info file cpp.info, or the manual The C Preprocessor . Both of these are built from the same documentation source file, cpp.texinfo. The GNU C preprocessor provides a superset of the features of ANSI Standard C.
ANSI Standard C requires the rejection of many harmless constructs commonly used by today’s C programs. Such incompatibility would be inconvenient for users, so the GNU C preprocessor is configured to accept these constructs by default. Strictly speaking, to get ANSI Standard C, you must use the options –trigraphs, –undef, and –pedantic, but in practice the consequences of having strict ANSI Standard C make it undesirable to do this.
When you use the C preprocessor, you will usually not have to invoke it explicitly: the C compiler will do so automatically. However, the preprocessor is sometimes useful individually.
The C preprocessor expects two filenames as arguments, infile and outfile. The preprocessor reads infile together with
any other files it specifies with #include. All the output generated by the combined input files is written in outfile. Either
infile or outfile may be –, which as infile means to read from standard input and as outfile means to write to standard output. Also, if outfile or both filenames are omitted, the standard output and standard input are used for the omitted filenames.
OPTIONS
Here is a table of command options accepted by the C preprocessor. These options can also be given when compiling a C program; they are passed along automatically to the preprocessor when it is invoked by the compiler.
–P Inhibit generation of # lines with line-number information in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code and will be sent to a program which might be confused by the # lines.
–C Do not discard comments: pass them through to the output file. Comments appearing in arguments of a macro call will be copied to the output before the expansion of the macro call.
–traditional Try to imitate the behavior of old-fashioned C, as opposed to ANSI C.
–trigraphs Process ANSI standard trigraph sequences. These are three-character sequences, all starting with ??, that are defined by ANSI C to stand for single characters. For example, ??/ stands for \, so ??/n is a character constant for a newline. Strictly speaking, the GNU C preprocessor does not support all programs in ANSI Standard C unless –trigraphs is used, but if you ever notice the difference, it will be with relief. You don’t want to know any more about trigraphs.
–pedantic Issue warnings required by the ANSI C standard in certain cases such as when text other than a comment follows #else or #endif.
–pedantic–errors Like –pedantic, except that errors are produced rather than warnings.
–Wtrigraphs Warn if any trigraphs are encountered (assuming they are enabled).
–Wcomment Warn whenever a comment-start sequence /* appears in a comment. (Both forms have the
–Wcomments same effect.)
–Wall Requests both –Wtrigraphs and –Wcomment (but not –Wtraditional).
–Wtraditional Warn about certain constructs that behave differently in traditional and ANSI C.
–I directory Add the directory directory to the end of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories