gdiffmk(1) — Linux manual page

Name | Synopsis | Description | Options | Exit status | Bugs | Authors | See also | COLOPHON

gdiffmk(1)               General Commands Manual              gdiffmk(1)

Name         top

       gdiffmk - mark differences between groff/nroff/troff files

Synopsis         top

       gdiffmk [-a add-mark] [-c change-mark] [-d delete-mark] [-x diff-
               command] [-D [-B] [-M mark1 mark2]] [--] file1 file2
               [output-file]

       gdiffmk --help

       gdiffmk --version

Description         top

       gdiffmk compares two roff(7) documents, file1 and file2, and
       writes a roff to the standard output stream (or output-file)
       consisting of file2 with added margin character (.mc) requests
       indicating output lines that differ from file1.  If the file1 or
       file2 argument is “-”, gdiffmk reads the standard input stream
       for that input.  If the output operand is present, gdiffmk writes
       output to a file of that name.  If it is “-” or absent, gdiffmk
       writes output to the standard output stream.  “-” cannot be both
       an input and output operand.

Options         top

       --help displays a usage message and --version shows version
       information; both exit afterward.

       -a add-mark
              Use add-mark for source lines not in file1 but present in
              file2.  Default: “+”.

       -B     By default, the deleted texts marked by the -D option end
              with an added roff break request, .br, to ensure that the
              deletions are marked properly.  This is the only way to
              guarantee that deletions and small changes get flagged.
              This option directs the program not to insert these
              breaks; it makes no sense to use it without -D.

       -c change-mark
              Use change-mark for changed source lines.  Default: “|”.

       -d delete-mark
              Use the delete-mark for deleted source lines.  Default:
              “*”.

       -D     Show the deleted portions from changed and deleted text.

       -M mark1 mark2
              Change the delimiting marks for the -D option.  It makes
              no sense to use this option without -D.  Default
              delimiting marks: “[[” ... “]]”.

       -x diff-command
              Use the diff-command command to perform the comparison of
              file1 and file2.  In particular, diff-command should
              accept the GNU diff(1) -D option.  Default: diff.

       --     Treat all subsequent arguments as file names, even if they
              begin with “-”.

Exit status         top

       gdiffmk exits with status 0 if the input files are the same; 1 if
       they differ; 2 upon a usage error; 3 if the system's diff(1) or
       sh(1) commands do not support features gdiffmk requires; and 4 if
       the output argument is a duplicate of file1 or file2.

Bugs         top

       The output is not necessarily compatible with all macro packages
       or preprocessors.  A reliable workaround is to run gdiffmk on the
       output of the final preprocessor instead of the input source.

       gdiffmk relies on the -D option of GNU diff to make a merged
       “#ifdef” output format.  Busybox diff is known to not support it.
       Also see the -x diff-command option.

Authors         top

       gdiffmk was written by Mike Bianchi ⟨MBianchi@Foveal.com⟩, now
       retired.  It is maintained by the groff developers.

See also         top

       groff(1), nroff(1), gtroff(1), roff(7), diff(1)

COLOPHON         top

       This page is part of the groff (GNU troff) project.  Information
       about the project can be found at 
       ⟨http://www.gnu.org/software/groff/⟩.  If you have a bug report
       for this manual page, see ⟨http://www.gnu.org/software/groff/⟩.
       This page was obtained from the project's upstream Git repository
       ⟨https://git.savannah.gnu.org/git/groff.git⟩ on 2024-06-14.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2024-06-10.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

groff 1.23.0.1273-9d53-dirty   6 June 2024                    gdiffmk(1)