home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / DIFFPT.ZIP / DIFF3.MAN < prev    next >
Text File  |  1991-07-01  |  5KB  |  129 lines

  1. NAME
  2.      diff3 - 3-way differential file comparison
  3.  
  4. SYNTAX
  5.      diff3 [-ex3] file1 file2 file3
  6.  
  7. DESCRIPTION
  8.      The diff3 command compares three versions of a file, and
  9.      publishes the ranges of text that disagree, flagged with the
  10.      following codes:
  11.  
  12.      ====                all three files differ
  13.  
  14.      ====1               file1 is different
  15.  
  16.      ====2               file2 is different
  17.  
  18.      ====3               file3 is different
  19.  
  20.      The type of change needed to convert a given range of a
  21.      given file to some other is indicated in one of these ways:
  22.  
  23.      f : n1 a            Text is to be appended after line number
  24.                          n1 in file f, where f = 1, 2, or 3.
  25.  
  26.      f : n1 , n2 c       Text is to be changed in the range line
  27.                          n1 to line n2.  If n1 = n2, the range
  28.                          may be abbreviated to n1.
  29.  
  30.      The original contents of the range follows immediately after
  31.      a c indication.  When the contents of two files are identi-
  32.      cal, the contents of the lower-numbered file is suppressed.
  33.  
  34. OPTIONS
  35.      -3                  Produces an ed editor script containing
  36.                          the changes between file1 and file2 that
  37.                          are to be incorporated into file3.
  38.  
  39.      -e                  Produces an ed editor script containing
  40.                          the changes between file2 and file3 that
  41.                          are to be incorporated into file1.
  42.  
  43.      -x                  Produces an ed editor script containing
  44.                          the changes among all three files.
  45.  
  46. EXAMPLES
  47.      Under the -e option, diff3 publishes a script for the editor
  48.      ed that incorporates into file1 all changes between file2
  49.      and file3 -- that is, the changes that would normally be
  50.      flagged ==== and ====3.  Option -x (-3) produces a script to
  51.      incorporate only changes flagged ==== (====3).  The follow-
  52.      ing command applies the resulting script to `file1':
  53.  
  54.           (cat script; echo '1,$p') | ed - file1
  55.  
  56. RESTRICTIONS
  57.      Text lines that consist of a single `.' defeat -e.
  58.  
  59. FILES
  60.      /tmp/d3?????
  61.      /usr/lib/diff3
  62.  
  63. SEE ALSO
  64.      diff(1)
  65.  
  66. ------------------------
  67.  
  68. NAME
  69.      diff3 - GNU diff3, display line-by-line differences between
  70.      3 files, including binary files
  71.  
  72. SYNOPSIS
  73.      diff [ options ] filename1 filename2 filename3
  74.  
  75. WARNING
  76.      This manual page is updated only occasionally, because the
  77.      GNU project does not use nroff.
  78.  
  79. DESCRIPTION
  80.      This version of diff3 has all of BSD diff3's features, with
  81.      the following additional features.
  82.  
  83.      An input file may end in a non-newline character.  With the
  84.      -m option, an incomplete last line stays incomplete.  Other
  85.      output styles treat incomplete lines like diff.
  86.  
  87.      The file name '-' denotes the standard input.  It can appear
  88.      at most once.
  89.  
  90. OPTIONS
  91.      GNU diff3 has the following additional options:
  92.  
  93.      -a             Always treat files as text and compare them
  94.                     line-by-line, even if they do not appear to
  95.                     be text.
  96.  
  97.      -i             Include 'w' and 'q' commands at the end of
  98.                     the output, to write out the changed file,
  99.                     thus emulating System V behavior.  One of the
  100.                     edit script options -e, -E, -x, -X, -3 must
  101.                     also be specified.
  102.  
  103.      -m             Apply the edit script to the first file and
  104.                     send the result to standard output.  Unlike
  105.                     piping diff3's output to ed(1), this works
  106.                     even for binary files and incomplete lines.
  107.                     -E is assumed if no edit script option is
  108.                     specified.  This option is incompatible with
  109.                     -i.
  110.  
  111.      -L label       Use the specified label for lines output by
  112.                     the -E and -X options, one of which must also
  113.                     be specified.  This option may be given zero,
  114.                     one, or two times; the first label marks
  115.                     <<<<<<< lines and the second marks >>>>>>>
  116.                     lines.  The default labels are the names of
  117.                     the first and third files on the command
  118.                     line.  Thus `diff3 -L X -L Z -E A B C' acts
  119.                     like `diff3 -E A B C', except that the output
  120.                     looks like it came from files named X and Z
  121.                     rather than from files named A and C.
  122.  
  123. DIAGNOSTICS
  124.      Exit status 0 means success, 1 means overlaps were found and
  125.      -E or -X was specified, and 2 means trouble.
  126.  
  127. SEE ALSO
  128.      diff(1), ed(1)
  129.