Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ diffmk(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

diff

nroff, troff



DIFFMK(1,C)                 AIX Commands Reference                  DIFFMK(1,C)



-------------------------------------------------------------------------------
diffmk



PURPOSE

Identifies differences between two versions of a file.

SYNTAX


          +----------------------------+                       +---------+
diffmk ---| +------------------------+ |--- file1 --- file2 ---|         |---|
          +-| -b                     |-+                       +- file3 -+
           ^| -abstringX  -aestringX ||
           || -cbstringX  -cestringX ||
           || -dbstringX  -destringX ||
           |+------------------------+|
           +--------------------------+


Note:  This command does not have MBCS support.

DESCRIPTION

The diffmk command compares file1 and file2 and creates a third file that
includes change mark commands for the nroff and troff commands.  The old and
new versions of the file are file1 and file2, respectively.  The diffmk command
writes the newly created file to file3, if specified, or to standard output.
This file contains the lines of file2 with formatter change mark (.mc) requests
inserted as appropriate.  When file3 is formatted, the changed or inserted text
is marked with a | (vertical bar) in the right margin of each line.  An "*"
(asterisk) in the margin indicates that a line was deleted.

If the environment parameter DIFFMARK is defined, it names a command string
that the diffmk command uses to compare the files.  (Normally, the diffmk
command uses the diff command.)  For example, you might set DIFFMARK to "diff
-h" in order to better handle extremely large files.

FLAGS

-b                        Ignores differences that are changes to tabs or
                          spaces on a line.

-abstringX -aestringX     Uses X (a string) to mark where added lines begin and
                          end.

-cbstringX -cestringX     Uses X (a string) to mark the beginning and end of a
                          changed line.





Processed November 8, 1990        DIFFMK(1,C)                                 1





DIFFMK(1,C)                 AIX Commands Reference                  DIFFMK(1,C)



-dbstringX -destringX     Uses X (a string) to mark where deleted lines begin
                          and end.

EXAMPLES

  1. To identify differences between two versions of a text file:

      diffmk  chap1.old  chap1  > chap1.nroff

    This command produces a copy of the file "chap1", which contains
    nroff/troff change mark commands that identify text that has been added to,
    changed in, or deleted from the file "chap1.old".  This copy is saved in
    the file "chap1.nroff".

  2. To identify differences between files without issuing nroff/troff
    messages:

      diffmk -ab'>>New:' -ae'<<End New' chap1.old  chap1  >chap1.nroff

    This command causes the diffmk command to write the message ">>New:" on the
    line preceding a section of new lines that have been added to the file
    "chap1" and to write the message "<<End New" on the line following the
    added lines.  Changes and deletions still generate nroff/troff commands to
    put a | or "*" in the margin.

  3. To use different nroff/troff marking commands and ignore changes in white
    space:

      diffmk  -b  -cb'.mc  %'  -ce' ' chap1.old  chap1  > chap1.nroff

    This command imbeds commands that mark changes to lines with "%", additions
    with |, and deletions with "*".  It does not mark changes that only involve
    a different number of spaces or tabs between words ("-b").

RELATED INFORMATION

See the following commands:  "diff" and "nroff, troff."


















Processed November 8, 1990        DIFFMK(1,C)                                 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026