BSD 4_4 development
[unix-history] / usr / share / man / cat1 / diffh.0
index e1256a9..5d03f81 100644 (file)
@@ -1,96 +1,95 @@
-DIFF(1)                     UNIX Reference Manual                     DIFF(1)
+DIFF(1)                      BSD Reference Manual                      DIFF(1)
 
 N\bNA\bAM\bME\bE
      d\bdi\bif\bff\bf - differential file and directory comparator
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
      d\bdi\bif\bff\bf [-\b-c\bce\bef\bfh\bhn\bn] [-\b-b\bbi\biw\bwt\bt] _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2
 
 N\bNA\bAM\bME\bE
      d\bdi\bif\bff\bf - differential file and directory comparator
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
      d\bdi\bif\bff\bf [-\b-c\bce\bef\bfh\bhn\bn] [-\b-b\bbi\biw\bwt\bt] _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2
-     d\bdi\bif\bff\bf [-\b-D\bD _\bs_\bt_\br_\bi_\bn_\bg] [-\b-b\bbi\biw\bw] _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2
-     d\bdi\bif\bff\bf [-\b-l\bl] [-\b-r\br] [-\b-s\bs] [-\b-c\bce\bef\bfh\bhn\bn] [-\b-b\bbi\biw\bwt\bt] _\bd_\bi_\br_\b1 _\bd_\bi_\br_\b2
+     d\bdi\bif\bff\bf [-\b-D\bD_\bs_\bt_\br_\bi_\bn_\bg] [-\b-b\bbi\biw\bw] _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2
+     d\bdi\bif\bff\bf [-\b-l\bl] [-\b-r\br] [-\b-s\bs] [-\b-c\bce\bef\bfh\bhn\bn] [-\b-b\bbi\biw\bwt\bt] [-\b-S\bS_\bn_\ba_\bm_\be] _\bd_\bi_\br_\b1 _\bd_\bi_\br_\b2
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
      The d\bdi\bif\bff\bf utility compares the contents of _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 and writes to
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
      The d\bdi\bif\bff\bf utility compares the contents of _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 and writes to
-     the standard output the list of changes necessary to convert one file
-     into the other.  No output is produced if the files are identical.
+     the standard output the list of changes necessary to convert one file in-
+     to the other.  No output is produced if the files are identical.
 
      Output options (mutually exclusive):
 
 
      Output options (mutually exclusive):
 
-     -\b-c\bc        produces a diff with lines of context.  The default is to
-              present 3 lines of context and may be changed, e.g to 10, by
-              -\b-c\bc1\b10\b0.  With -\b-c\bc the output format is modified slightly: the out-
-              put beginning with identification of the files involved and
-              their creation dates and then each change is separated by a
-              line with a dozen *'s.  The lines removed from _\bf_\bi_\bl_\be_\b1 are marked
-              with `- '; those added to _\bf_\bi_\bl_\be_\b2 are marked `+ '.  Lines which
-              are changed from one file to the other are marked in both files
-              with with `! '.  Changes which lie within <context> lines of
-              each other are grouped together on output.  (This is a change
-              from the previous ``diff -c'' but the resulting output is usu-
-              ally much easier to interpret.)
-
-     -\b-e\be        produces output in a form suitable as input for the editor
-              utility, ed(1), which can then be used to convert file1 into
-              file2.
-
-              Extra commands are added to the output when comparing direc-
-              tories with -\b-e\be, so that the result is a sh(1) script for con-
-              verting text files which are common to the two directories from
-              their state in _\bd_\bi_\br_\b1 to their state in _\bd_\bi_\br_\b2.
-
-     -\b-f\bf        identical output of the -\b-e\be flag, but in reverse order.  It can-
-              not be digested by ed(1).
-
-     -\b-h\bh        Invokes an alternate algorithm which can handle files of very
-              long lengths.  There is a trade off. The algorithm can only
-              deal with changes which are clearly delimited and brief. Long
-              sections of changes and overlaps will confuse it.
-
-     -\b-n\bn        produces a script similar to that of -\b-e\be, but in the opposite
-              order and with a count of changed lines on each insert or
-              delete command.  This is the form used by rcsdiff(1).
+     -\b-c\bc      produces a diff with lines of context.  The default is to present
+             3 lines of context and may be changed, e.g., to 10, by -\b-c\bc1\b10\b0. With
+             -\b-c\bc the output format is modified slightly: the output beginning
+             with identification of the files involved and their creation
+             dates and then each change is separated by a line with a dozen
+             *'s.  The lines removed from _\bf_\bi_\bl_\be_\b1 are marked with `- '; those
+             added to _\bf_\bi_\bl_\be_\b2 are marked `+ '.  Lines which are changed from one
+             file to the other are marked in both files with `! '.  Changes
+             which lie within <context> lines of each other are grouped to-
+             gether on output.  (This is a change from the previous ``diff
+             -c'' but the resulting output is usually much easier to inter-
+             pret.)
+
+     -\b-e\be      produces output in a form suitable as input for the editor utili-
+             ty, ed(1),  which can then be used to convert file1 into file2.
+
+             Extra commands are added to the output when comparing directories
+             with -\b-e\be, so that the result is a sh(1) script for converting text
+             files which are common to the two directories from their state in
+             _\bd_\bi_\br_\b1 to their state in _\bd_\bi_\br_\b2.
+
+     -\b-f\bf      identical output to that of the -\b-e\be flag, but in reverse order.
+             It cannot be digested by ed(1).
+
+     -\b-h\bh      Invokes an alternate algorithm which can handle files of very
+             long lengths.  There is a trade off. The algorithm can only deal
+             with changes which are clearly delimited and brief. Long sections
+             of changes and overlaps will confuse it.
+
+     -\b-n\bn      produces a script similar to that of -\b-e\be, but in the opposite or-
+             der and with a count of changed lines on each insert or delete
+             command.  This is the form used by rcsdiff(1).
 
      -\b-D\bD_\bs_\bt_\br_\bi_\bn_\bg
 
      -\b-D\bD_\bs_\bt_\br_\bi_\bn_\bg
-              creates a merged version of _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 on the standard
-              output, with C preprocessor controls included so that a compi-
-              lation of the result without defining _\bs_\bt_\br_\bi_\bn_\bg is equivalent to
-              compiling _\bf_\bi_\bl_\be_\b1, while defining _\bs_\bt_\br_\bi_\bn_\bg will yield _\bf_\bi_\bl_\be_\b2.
+             creates a merged version of _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 on the standard out-
+             put, with C preprocessor controls included so that a compilation
+             of the result without defining _\bs_\bt_\br_\bi_\bn_\bg is equivalent to compiling
+             _\bf_\bi_\bl_\be_\b1, while defining _\bs_\bt_\br_\bi_\bn_\bg will yield _\bf_\bi_\bl_\be_\b2.
 
      Comparison options:
 
 
      Comparison options:
 
-     -\b-b\bb        causes trailing blanks (spaces and tabs) to be ignored, and
-              other strings of blanks to compare equal.
+     -\b-b\bb      causes trailing blanks (spaces and tabs) to be ignored, and other
+             strings of blanks to compare equal.
 
 
-     -\b-i\bi        ignores the case of letters.  E.g., ``A'' will compare equal to
-              ``a''.
+     -\b-i\bi      ignores the case of letters.  E.g., ``A'' will compare equal to
+             ``a''.
 
 
-     -\b-t\bt        will expand tabs in output lines.  Normal or -\b-c\bc output adds
-              character(s) to the front of each line which may screw up the
-              indentation of the original source lines and make the output
-              listing difficult to interpret.  This option will preserve the
-              original source's indentation.
+     -\b-t\bt      will expand tabs in output lines.  Normal or -\b-c\bc output adds char-
+             acter(s) to the front of each line which may screw up the inden-
+             tation of the original source lines and make the output listing
+             difficult to interpret.  This option will preserve the original
+             source's indentation.
 
 
-     -\b-w\bw        is similar to -\b-b\bb but causes whitespace (blanks and tabs) to be
-              totally ignored.  E.g., ``if ( a == b )'' will compare equal to
-              ``if(a==b)''.
+     -\b-w\bw      is similar to -\b-b\bb but causes whitespace (blanks and tabs) to be
+             totally ignored.  E.g., ``if ( a == b )'' will compare equal to
+             ``if(a==b)''.
 
      Directory comparison options:
 
 
      Directory comparison options:
 
-     -\b-l\bl        long output format; each text file d\bdi\bif\bff\bf'd is piped through
-              pr(1) to paginate it, other differences are remembered and
-              summarized after all text file differences are reported.
+     -\b-l\bl      long output format; each text file d\bdi\bif\bff\bf'd is piped through pr(1)
+             to paginate it, other differences are remembered and summarized
+             after all text file differences are reported.
 
 
-     -\b-r\br        causes application of d\bdi\bif\bff\bf recursively to common subdirectories
-              encountered.
+     -\b-r\br      causes application of d\bdi\bif\bff\bf recursively to common subdirectories
+             encountered.
 
 
-     -\b-s\bs        causes d\bdi\bif\bff\bf to report files which are the same, which are oth-
-              erwise not mentioned.
+     -\b-s\bs      causes d\bdi\bif\bff\bf to report files which are the same, which are other-
+             wise not mentioned.
 
 
-     -\b-S\bS_\bn_\ba_\bm_\be    re-starts a directory d\bdi\bif\bff\bf in the middle beginning with file
-              _\bn_\ba_\bm_\be.
+     -\b-S\bS_\bn_\ba_\bm_\be  re-starts a directory d\bdi\bif\bff\bf in the middle beginning with file
+             _\bn_\ba_\bm_\be.
 
      If both arguments are directories, d\bdi\bif\bff\bf sorts the contents of the direc-
      tories by name, and then runs the regular file d\bdi\bif\bff\bf algorithm, producing
 
      If both arguments are directories, d\bdi\bif\bff\bf sorts the contents of the direc-
      tories by name, and then runs the regular file d\bdi\bif\bff\bf algorithm, producing
-     a change list, on text files which are different. Binary files which
+     a change list, on text files which are different.  Binary files which
      differ, common subdirectories, and files which appear in only one direc-
      tory are described as such.
 
      differ, common subdirectories, and files which appear in only one direc-
      tory are described as such.
 
@@ -99,70 +98,65 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
      filename that is the same as the last component of the non-directory
      file.
 
      filename that is the same as the last component of the non-directory
      file.
 
-     If either the _\bf_\bi_\bl_\be_\b1 or _\bf_\bi_\bl_\be_\b2 is the standard input is used in its place.
+     If either _\bf_\bi_\bl_\be_\b1 or _\bf_\bi_\bl_\be_\b2 is `-\b-', the standard input is used in its place.
 
 
-  O\bOu\but\btp\bpu\but\bt S\bSt\bty\byl\ble\be
+   O\bOu\but\btp\bpu\but\bt S\bSt\bty\byl\ble\be
      The default (without -\b-e\be, -\b-c\bc, or -\b-n\bn options) output contains lines of
      The default (without -\b-e\be, -\b-c\bc, or -\b-n\bn options) output contains lines of
-     these forms, where _\bX_\bX, _\bY_\bY, _\bZ_\bZ, _\bQ_\bQ are line numbers respective of file
-     order.
-
-          XXa\baYY             At (the end of) line _\bX_\bX of _\bf_\bi_\bl_\be_\b1, append the
-                              contents of line _\bY_\bY of _\bf_\bi_\bl_\be_\b2 to make them
-                              equal.
-          XXa\baYY,ZZ          Same as above, but append the range of lines,
-                              _\bY_\bY through _\bZ_\bZ of _\bf_\bi_\bl_\be_\b2 to line _\bX_\bX of file1.
-          XXd\bdYY             At line _\bX_\bX delete the line. The value _\bY_\bY tells
-                              to which line the change would bring _\bf_\bi_\bl_\be_\b1 in
-                              line with _\bf_\bi_\bl_\be_\b1.
-          XX,YYd\bdZZ          Delete the range of lines _\bX_\bX through _\bY_\bY in
-                              _\bf_\bi_\bl_\be_\b1.
-          XXc\bcYY             Change the line _\bX_\bX in _\bf_\bi_\bl_\be_\b1 to the line _\bY_\bY in
-                              _\bf_\bi_\bl_\be_\b2.
-          XX,YYc\bcZZ          Replace the range of specified lines with the
-                              line _\bZ_\bZ.
-          XX,YYc\bcZZ,QQ               Replace the range _\bX_\bX,_\bY_\bY from _\bf_\bi_\bl_\be_\b1 with the
-                              range _\bZ_\bZ,_\bQ_\bQ from _\bf_\bi_\bl_\be_\b2.
-
-
-     These lines resemble ed(1) subcommands to convert _\bf_\bi_\bl_\be_\b1 into _\bf_\bi_\bl_\be_\b2.  The
+     these forms, where _\bX_\bX, _\bY_\bY, _\bZ_\bZ, _\bQ_\bQ are line numbers respective of file or-
+     der.
+
+     XXa\baYY        At (the end of) line _\bX_\bX of _\bf_\bi_\bl_\be_\b1, append the contents of
+                  line _\bY_\bY of _\bf_\bi_\bl_\be_\b2 to make them equal.
+     XXa\baYY,ZZ     Same as above, but append the range of lines, _\bY_\bY through _\bZ_\bZ
+                  of _\bf_\bi_\bl_\be_\b2 to line _\bX_\bX of file1.
+     XXd\bdYY        At line _\bX_\bX delete the line. The value _\bY_\bY tells to which line
+                  the change would bring _\bf_\bi_\bl_\be_\b1 in line with _\bf_\bi_\bl_\be_\b1.
+     XX,YYd\bdZZ     Delete the range of lines _\bX_\bX through _\bY_\bY in _\bf_\bi_\bl_\be_\b1.
+     XXc\bcYY        Change the line _\bX_\bX in _\bf_\bi_\bl_\be_\b1 to the line _\bY_\bY in _\bf_\bi_\bl_\be_\b2_\b.
+     XX,YYc\bcZZ     Replace the range of specified lines with the line _\bZ_\bZ.
+     XX,YYc\bcZZ,QQ  Replace the range _\bX_\bX,YY from _\bf_\bi_\bl_\be_\b1 with the range _\bZ_\bZ,QQ from
+                  _\bf_\bi_\bl_\be_\b2.
+
+     These lines resemble ed(1) subcommands to convert _\bf_\bi_\bl_\be_\b1 into _\bf_\bi_\bl_\be_\b2. The
      line numbers before the action letters pertain to _\bf_\bi_\bl_\be_\b1; those after per-
      line numbers before the action letters pertain to _\bf_\bi_\bl_\be_\b1; those after per-
-     tain to _\bf_\bi_\bl_\be_\b2.  Thus, by exchanging a\ba for d\bd and reading the line in re-
-     verse order, one can also determine how to convert _\bf_\bi_\bl_\be_\b2 into _\bf_\bi_\bl_\be_\b1.  As
-     in ed(1), identical pairs (where num1 = num2) are abbreviated as a single
-     number.
+     tain to _\bf_\bi_\bl_\be_\b2. Thus, by exchanging a\ba for d\bd and reading the line in re-
+     verse order, one can also determine how to convert _\bf_\bi_\bl_\be_\b2 into _\bf_\bi_\bl_\be_\b1. As
+     in ed(1),  identical pairs (where num1 = num2) are abbreviated as a sin-
+     gle number.
 
 E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
 
 E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
-     TMPDIR    If the environment variable TMPDIR exists, D\bDi\bif\bff\bf will use the
-              name specified by TMPDIR as an alternate temporary directory.
+     TMPDIR  If the environment variable TMPDIR exists, d\bdi\bif\bff\bf will use the di-
+             rectory specified by TMPDIR as the temporary directory.
 
 F\bFI\bIL\bLE\bES\bS
 
 F\bFI\bIL\bLE\bES\bS
-     /_\bt_\bm_\bp/_\bd?????
-     /_\bu_\bs_\br/_\bb_\bi_\bn/_\bd_\bi_\bf_\bf_\bh   Alternate algorithm version (used by option -\b-h\bh).
-     /_\bu_\bs_\br/_\bb_\bi_\bn/_\bd_\bi_\bf_\bf    for directory diffs
-     /_\bu_\bs_\br/_\bb_\bi_\bn/_\bp_\br      used by the -\b-l\bl option.
 
 
+     /tmp/d?????
+     /usr/bin/diffh  Alternate algorithm version (used by option -\b-h\bh).
+     /usr/bin/diff   for directory diffs
+     /usr/bin/pr     used by the -\b-l\bl option.
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
-     cmp(1), cc(1), comm(1), ed(1), diff3(1)
-
-H\bHI\bIS\bST\bTO\bOR\bRY\bY
-     D\bDi\bif\bff\bf appeared in Version 6 AT&T Unix.
+     cmp(1),  cc(1),  comm(1),  ed(1),  diff3(1)
 
 D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
      The d\bdi\bif\bff\bf utility exits with one of the following values:
 
 
 D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
      The d\bdi\bif\bff\bf utility exits with one of the following values:
 
-          0     No differences were found.
-          1     Differences were found.
-          >1    An error occurred.
-
+           0       No differences were found.
+           1       Differences were found.
+           >1      An error occurred.
 
 B\bBU\bUG\bGS\bS
      The -\b-f\bf and -\b-e\be options do not provide special handling for lines on which
 
 B\bBU\bUG\bGS\bS
      The -\b-f\bf and -\b-e\be options do not provide special handling for lines on which
-     the first and only character is ``.''.  This can cause problems for
-     ed(1).
+     the first and only character is ``.''. This can cause problems for ed(1).
+
 
      When comparing directories with the -\b-b\bb, -\b-w\bw or -\b-i\bi options specified, d\bdi\bif\bff\bf
      first compares the files ala _\bc_\bm_\bp, and then decides to run the d\bdi\bif\bff\bf algo-
      rithm if they are not equal.  This may cause a small amount of spurious
 
      When comparing directories with the -\b-b\bb, -\b-w\bw or -\b-i\bi options specified, d\bdi\bif\bff\bf
      first compares the files ala _\bc_\bm_\bp, and then decides to run the d\bdi\bif\bff\bf algo-
      rithm if they are not equal.  This may cause a small amount of spurious
-     output if the files then turn out to be identical because the only
-     differences are insignificant white space or case differences.
+     output if the files then turn out to be identical because the only dif-
+     ferences are insignificant white space or case differences.
+
+H\bHI\bIS\bST\bTO\bOR\bRY\bY
+     A d\bdi\bif\bff\bf command appeared in Version 6 AT&T UNIX.
+
+4th Berkeley Distribution        June 30, 1993                               3