Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

diffmk(1) [osf1 man page]

diffmk(1)						      General Commands Manual							 diffmk(1)

NAME
diffmk - Marks differences between files SYNOPSIS
diffmk [-b] [-ab'mark'] [-ae'mark'] [-cb'mark'] [-ce'mark'] [-db'mark'] [-de'mark'] file1 file2 The diffmk command compares two versions of a file and creates a new file that marks the differences. OPTIONS
Uses mark to mark where added lines begin. Uses mark to mark where added lines end. Ignores differences that are only changes in tabs or spaces on a line. Uses mark to mark where changed lines begin. Uses mark to mark where changed lines end. Uses mark to mark where deleted lines begin. Uses mark to mark where deleted lines end. DESCRIPTION
The file1 and file2 variables are the old and new versions of the file, respectively. The diffmk command compares them and writes a new version to standard output, which can be redirected to a file. This output contains the lines of file2 marked with nroff change mark requests (.mc), or with the marks you specify with the -ab, -ae, -cb, -ce, -db, and -de options. When output containing requests is formatted with nroff, changed or inserted lines are marked by a | (vertical bar) at the right margin of each line. An * (asterisk) indicates that a line was deleted. If the DIFFMARK environment variable is defined, it names a command string that diffmk uses to compare the files. (Normally, diffmk uses the diff command.) For example, you might set DIFFMARK to diff -h in order to better handle extremely large files. EXAMPLES
To mark the differences between two versions of a text file, enter: diffmk -ab'>I:' -ae'<I' -cb'>C' -ce'<C' -db'>D' -de'<D' chap1.old chap1 >chap1.diffs This causes diffmk to create a copy of chap1 called chap1.diffs, showing differences between chap1.old and chap1. Additions of one or more lines are marked with >I and <I, changed lines are marked with >C and <C, and deletions are marked with >D and <D. To mark differences with nroff requests, enter: diffmk chap1.old chap1 > chap1.nroff This produces a copy of chap1 called chap1.nroff containing nroff change mark requests to identify text that was added to, changed, or deleted from chap1.old. To use different nroff marking requests and ignore changes in white space, enter: diffmk -b -cb'.mc %' chap1.old chap1 > chap1.nroff This imbeds commands that mark changes with % (percent sign), additions with | (the default, because no -a option is specified), and deletions with * (the default). It does not mark changes that only involve a different number of spaces or tabs between words (-b). SEE ALSO
Commands: diff(1), nroff(1) diffmk(1)

Check Out this Related Man Page

diffmk(1)						      General Commands Manual							 diffmk(1)

NAME
diffmk - mark changes between two different versions of a file SYNOPSIS
prevfile currfile markfile DESCRIPTION
compares the previous version of a file with the current version and creates a file that includes ``change mark'' commands. prevfile is the name of the previous version of the file and currfile is the name of the current version of the file. generates markfile which con- tains all the lines of the currfile plus inserted formatter ``change mark'' requests. When markfile is formatted, changed or inserted text is shown by a character at the right margin of each line. The position of deleted text is shown by a single If the characters and are inappropriate, a copy of can be edited to change them because is a shell script. EXTERNAL INFLUENCES
International Code Set Support Single- and multi-byte character code sets are supported. EXAMPLES
A typical command line for comparing two versions of an file and generating a file with the changes marked is: can also be used to produce listings of C (or other) programs with changes marked. A typical command line for such use is: where the file contains: The request can specify a different line length, depending on the nature of the program being printed. The request is probably needed only for C programs. WARNINGS
Aesthetic considerations may dictate manual adjustment of some output. does not differentiate between changes in text and changes in formatter request coding. Thus, file differences involving only formatting changes (such as replacing with in a text source file) with no change in actual text can produce change marks. Although unlikely, certain combinations of formatting requests can cause change marks to either disappear or to mark too much. Manual intervention may be required because the subtleties of various formatting macro packages and preprocessors is beyond the scope of cannot tolerate commands in its input (see tbl(1)), so any request that would appear inside a range is silently deleted. The script can be changed if this action is inappropriate, or can be run on two files that have both been run through the preprocessor before any comparisons are made. uses and thus has the same limitations on file size and performance that may impose (see diff(1)). In particular the performance is non- linear with the size of the file, and very large files (well over 1000 lines) may take extremely long to process. Breaking the file into smaller pieces may be advisable. also uses the ed(1) editor. If the file is too large for error messages may be embedded in the file. Again, breaking the file into smaller pieces may be advisable. SEE ALSO
diff(1), nroff(1). diffmk(1)
Man Page