copyrite - copyright utility
copyrite [options] files...
Copyrite selectively comments source-files to prepend a copyright notice.
Copyrite reads each file, and checks to ensure that they - are nonbinary, - contain either an SCCS or RCS identifier, and - contain no prior copyright notice. The restriction to files containing SCCS or RCS identifiers is made to avoid modifying files that are used as references for test cases. You may override this restriction with the "-f" option. Copyrite assumes SCCS identifiers are constructed with "%W" or "%A" (and so yield the string "@(#)", followed by the filename). RCS identifiers "Id" or "Header" yield the filename as well. By looking for both the form of the identifier as well as matching the filename, copyrite can reduce the change of accidentally changing a file which is derived from another (e.g., via editing). Prior copyright notices are recognized by searching (ignoring case) for the word "copyright", followed by an (optionally comma-separated list of) years. If no conflict is found, copyrite then attempts to determine the type of file by examining its name and contents. If successful, it completes the change by renaming its working file onto the input file.
-c directs copyrite to insert the string "(c)" after the word "Copyright" in the generated notice. Use of this option is not necessary, and may indeed result in a defective (non-statutory) notice; however it is provided for cultural reasons. -e FILE redirects the standard error to the specified file. -f forces copyrite to markup files which have no RCS or SCCS identifier. -F forces copyrite to modify files which have notices owned by other organizations. -l LANG specify the default language for unknown cases (none) -L directs copyrite to operate on symbolic links that resolve to files or directories. Normally these are ignored. -m FILE specifies a file containing text for owner and disclaimer. Copyrite interprets the first line of the file as the owner. The remainder of the file is formatted into a paragraph as the disclaimer. -o FILE redirects the standard output to the specified file. -n shows the effect of changing the specified files without actually doing the change. Copyrite writes the changes to a temporary file and computes the differences. -q (quiet) suppress informational messages -r removes an existing notice (whose owner matches that specified, e.g., by the "-m" option). -R recur into directories -s strips comments which appear starting at the point in the input files at which copyrite would insert a notice. -T touches the changed files with the current date. If you do not use this option, copyrite derives the year from the last modification-date of the original file. -v (verbose) -w NUMBER sets the width of the notice-comment The default width is 80 columns.
Copyrite runs in either a UNIX or VAX/VMS environment.
Copyrite consists of a single binary file (on UNIX, "copyrite", on VAX/VMS, "copyrite.exe").
Copyrite can process only 7-bit ASCII files, since it uses the eighth bit for intermediate masking of the regions where it can edit files.
Make this able to operate on lists of years.
Thomas Dickey <email@example.com>. COPYRITE(1)