{
    "mode": "info",
    "parameter": "diffutils",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/diffutils/json",
    "generated": "2026-11-11T09:07:36Z",
    "sections": {
        "File: diffutils.info,  Node: Top,  Next: Overview,  Up: (dir)": {
            "content": "",
            "subsections": []
        },
        "Comparing and Merging Files": {
            "content": "",
            "subsections": []
        },
        "This manual is for GNU Diffutils (version 3.10, 2 January 2023), and": {
            "content": "documents the GNU 'diff', 'diff3', 'sdiff', and 'cmp' commands for\nshowing the differences between files and the GNU 'patch' command for\nusing their output to update files.\n\nCopyright (C) 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2023 Free\nSoftware Foundation, Inc.\n\nPermission is granted to copy, distribute and/or modify this\ndocument under the terms of the GNU Free Documentation License,\nVersion 1.3 or any later version published by the Free Software\nFoundation; with no Invariant Sections, no Front-Cover Texts, and\nno Back-Cover Texts.  A copy of the license is included in the\nsection entitled \"GNU Free Documentation License.\"\n\n* Menu:\n\n* Overview::              Preliminary information.\n* Comparison::            What file comparison means.\n\n* Output Formats::        Formats for two-way difference reports.\n* Incomplete Lines::      Lines that lack trailing newlines.\n* Comparing Directories:: Comparing files and directories.\n* Adjusting Output::      Making 'diff' output prettier.\n* diff Performance::      Making 'diff' smarter or faster.\n\n* Comparing Three Files:: Formats for three-way difference reports.\n* diff3 Merging::         Merging from a common ancestor.\n\n* Interactive Merging::   Interactive merging with 'sdiff'.\n\n* Merging with patch::    Using 'patch' to change old files into new ones.\n* Making Patches::        Tips for making and using patch distributions.\n\n* Invoking cmp::          Compare two files byte by byte.\n* Invoking diff::         Compare two files line by line.\n* Invoking diff3::        Compare three files line by line.\n* Invoking patch::        Apply a diff file to an original.\n* Invoking sdiff::        Side-by-side merge of file differences.\n\n* Standards conformance:: Conformance to the POSIX standard.\n* Projects::              If you've found a bug or other shortcoming.\n\n* Copying This Manual::   How to make copies of this manual.\n* Translations::          Available translations of this manual.\n* Index::                 Index.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Overview,  Next: Comparison,  Prev: Top,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "Overview": {
            "content": "",
            "subsections": []
        },
        "Computer users often find occasion to ask how two files differ.  Perhaps": {
            "content": "one file is a newer version of the other file.  Or maybe the two files\nstarted out as identical copies but were changed by different people.\n\nYou can use the 'diff' command to show differences between two files,\nor each corresponding file in two directories.  'diff' outputs\ndifferences between files line by line in any of several formats,\nselectable by command line options.  This set of differences is often\ncalled a \"diff\" or \"patch\".  For files that are identical, 'diff'\nnormally produces no output; for binary (non-text) files, 'diff'\nnormally reports only that they are different.\n\nYou can use the 'cmp' command to show the byte and line numbers where\ntwo files differ.  'cmp' can also show all the bytes that differ between\nthe two files, side by side.  A way to compare two files character by\ncharacter is the Emacs command 'M-x compare-windows'.  *Note Other\nWindow: (emacs)Other Window, for more information on that command.\n\nYou can use the 'diff3' command to show differences among three\nfiles.  When two people have made independent changes to a common\noriginal, 'diff3' can report the differences between the original and\nthe two changed versions, and can produce a merged file that contains\nboth persons' changes together with warnings about conflicts.\n\nYou can use the 'sdiff' command to merge two files interactively.\n\nYou can use the set of differences produced by 'diff' to distribute\nupdates to text files (such as program source code) to other people.",
            "subsections": []
        },
        "This method is especially useful when the differences are small compared": {
            "content": "to the complete files.  Given 'diff' output, you can use the 'patch'\nprogram to update, or \"patch\", a copy of the file.  If you think of\n'diff' as subtracting one file from another to produce their difference,\nyou can think of 'patch' as adding the difference to one file to\nreproduce the other.\n\nThis manual first concentrates on making diffs, and later shows how\nto use diffs to update files.\n\nGNU 'diff' was written by Paul Eggert, Mike Haertel, David Hayes,",
            "subsections": []
        },
        "Richard Stallman, and Len Tower.  Wayne Davison designed and implemented": {
            "content": "the unified output format.  The basic algorithm is described by Eugene\nW. Myers in \"An O(ND) Difference Algorithm and its Variations\",\n'Algorithmica' Vol. 1, 1986, pp. 251-266,\n<http://dx.doi.org/10.1007/BF01840446>; and in \"A File Comparison\nProgram\", Webb Miller and Eugene W. Myers, 'Software--Practice and",
            "subsections": []
        },
        "Experience' Vol. 15, 1985, pp. 1025-1040,": {
            "content": "<http://dx.doi.org/10.1002/spe.4380151102>.  The algorithm was\nindependently discovered as described by Esko Ukkonen in \"Algorithms for\nApproximate String Matching\", 'Information and Control' Vol. 64, 1985,\npp. 100-118, <http://dx.doi.org/10.1016/S0019-9958(85)80046-2>.  Unless\nthe '--minimal' option is used, 'diff' uses a heuristic by Paul Eggert\nthat limits the cost to O(N^1.5 log N) at the price of producing\nsuboptimal output for large inputs with many differences.  Related\nalgorithms are surveyed by Alfred V. Aho in section 6.3 of \"Algorithms\nfor Finding Patterns in Strings\", 'Handbook of Theoretical Computer",
            "subsections": []
        },
        "Science' (Jan Van Leeuwen, ed.), Vol. A, 'Algorithms and Complexity',": {
            "content": "Elsevier/MIT Press, 1990, pp. 255-300.\n\nGNU 'diff3' was written by Randy Smith.  GNU 'sdiff' was written by\nThomas Lord.  GNU 'cmp' was written by Torbjo\"rn Granlund and David\nMacKenzie.\n\nGNU 'patch' was written mainly by Larry Wall and Paul Eggert; several\nGNU enhancements were contributed by Wayne Davison and David MacKenzie.",
            "subsections": []
        },
        "Parts of this manual are adapted from a manual page written by Larry": {
            "content": "Wall, with his permission.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Comparison,  Next: Output Formats,  Prev: Overview,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "1 What Comparison Means": {
            "content": "There are several ways to think about the differences between two files.",
            "subsections": []
        },
        "One way to think of the differences is as a series of lines that were": {
            "content": "deleted from, inserted in, or changed in one file to produce the other\nfile.  'diff' compares two files line by line, finds groups of lines\nthat differ, and reports each group of differing lines.  It can report\nthe differing lines in several formats, which have different purposes.\n\nGNU 'diff' can show whether files are different without detailing the\ndifferences.  It also provides ways to suppress certain kinds of\ndifferences that are not important to you.  Most commonly, such\ndifferences are changes in the amount of white space between words or\nlines.  'diff' also provides ways to suppress differences in alphabetic\ncase or in lines that match a regular expression that you provide.",
            "subsections": []
        },
        "These options can accumulate; for example, you can ignore changes in": {
            "content": "both white space and alphabetic case.\n\nAnother way to think of the differences between two files is as a\nsequence of pairs of bytes that can be either identical or different.\n'cmp' reports the differences between two files byte by byte, instead of\nline by line.  As a result, it is often more useful than 'diff' for\ncomparing binary files.  For text files, 'cmp' is useful mainly when you\nwant to know only whether two files are identical, or whether one file\nis a prefix of the other.\n\nTo illustrate the effect that considering changes byte by byte can\nhave compared with considering them line by line, think of what happens\nif a single newline character is added to the beginning of a file.  If\nthat file is then compared with an otherwise identical file that lacks\nthe newline at the beginning, 'diff' will report that a blank line has\nbeen added to the file, while 'cmp' will report that almost every byte\nof the two files differs.\n\n'diff3' normally compares three input files line by line, finds\ngroups of lines that differ, and reports each group of differing lines.",
            "subsections": []
        },
        "Its output is designed to make it easy to inspect two different sets of": {
            "content": "changes to the same file.\n\nThese commands compare input files without necessarily reading them.",
            "subsections": []
        },
        "For example, if 'diff' is asked simply to report whether two files": {
            "content": "differ, and it discovers that the files have different sizes, it need\nnot read them to do its job.\n\n* Menu:\n\n* Hunks::             Groups of differing lines.\n* White Space::       Suppressing differences in white space.\n* Blank Lines::       Suppressing differences whose lines are all blank.\n* Specified Lines::   Suppressing differences whose lines all match a pattern.\n* Case Folding::      Suppressing differences in alphabetic case.\n* Brief::             Summarizing which files are different.\n* Binary::            Comparing binary files or forcing text comparisons.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Hunks,  Next: White Space,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.1 Hunks",
                    "content": ""
                }
            ]
        },
        "When comparing two files, 'diff' finds sequences of lines common to both": {
            "content": "files, interspersed with groups of differing lines called \"hunks\".",
            "subsections": []
        },
        "Comparing two identical files yields one sequence of common lines and no": {
            "content": "hunks, because no lines differ.  Comparing two entirely different files\nyields no common lines and one large hunk that contains all lines of\nboth files.  In general, there are many ways to match up lines between\ntwo given files.  'diff' tries to minimize the total hunk size by\nfinding large sequences of common lines interspersed with small hunks of\ndiffering lines.\n\nFor example, suppose the file 'F' contains the three lines 'a', 'b',\n'c', and the file 'G' contains the same three lines in reverse order\n'c', 'b', 'a'.  If 'diff' finds the line 'c' as common, then the command\n'diff F G' produces this output:\n\n1,2d0\n< a\n< b\n3a2,3\n> b\n> a\n",
            "subsections": []
        },
        "But if 'diff' notices the common line 'b' instead, it produces this": {
            "content": "output:\n\n1c1\n> c\n3c3\n> a\n",
            "subsections": []
        },
        "It is also possible to find 'a' as the common line.  'diff' does not": {
            "content": "always find an optimal matching between the files; it takes shortcuts to\nrun faster.  But its output is usually close to the shortest possible.\nYou can adjust this tradeoff with the '--minimal' ('-d') option (*note\ndiff Performance::).\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: White Space,  Next: Blank Lines,  Prev: Hunks,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.2 Suppressing Differences in Blank and Tab Spacing",
                    "content": ""
                }
            ]
        },
        "The '--ignore-tab-expansion' ('-E') option ignores the distinction": {
            "content": "between tabs and spaces on input.  A tab is considered to be equivalent\nto the number of spaces to the next tab stop (*note Tabs::).\n\nThe '--ignore-trailing-space' ('-Z') option ignores white space at\nline end.\n\nThe '--ignore-space-change' ('-b') option is stronger than '-E' and\n'-Z' combined.  It ignores white space at line end, and considers all\nother sequences of one or more white space characters within a line to\nbe equivalent.  With this option, 'diff' considers the following two\nlines to be equivalent, where '$' denotes the line end:\n\nHere lyeth  muche rychnesse  in lytell space.   -- John Heywood$\nHere lyeth muche rychnesse in lytell space. -- John Heywood   $\n\nThe '--ignore-all-space' ('-w') option is stronger still.  It ignores\ndifferences even if one line has white space where the other line has\nnone.  \"White space\" characters include tab, vertical tab, form feed,\ncarriage return, and space; some locales may define additional\ncharacters to be white space.  With this option, 'diff' considers the\nfollowing two lines to be equivalent, where '$' denotes the line end and\n'^M' denotes a carriage return:\n\nHere lyeth  muche  rychnesse in lytell space.--  John Heywood$\nHe relyeth much erychnes  seinly tells pace.  --John Heywood   ^M$\n\nFor many other programs newline is also a white space character, but\n'diff' is a line-oriented program and a newline character always ends a\nline.  Hence the '-w' or '--ignore-all-space' option does not ignore\nnewline-related changes; it ignores only other white space changes.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Blank Lines,  Next: Specified Lines,  Prev: White Space,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.3 Suppressing Differences Whose Lines Are All Blank",
                    "content": ""
                }
            ]
        },
        "The '--ignore-blank-lines' ('-B') option ignores changes that consist": {
            "content": "entirely of blank lines.  With this option, for example, a file\ncontaining\n1.  A point is that which has no part.\n\n2.  A line is breadthless length.\n-- Euclid, The Elements, I\nis considered identical to a file containing\n1.  A point is that which has no part.\n2.  A line is breadthless length.\n\n\n-- Euclid, The Elements, I\n\nNormally this option affects only lines that are completely empty,\nbut if you also specify an option that ignores trailing spaces, lines\nare also affected if they look empty but contain white space.  In other\nwords, '-B' is equivalent to '-I '^$'' by default, but it is equivalent\nto '-I '^[[:space:]]*$'' if '-b', '-w' or '-Z' is also specified.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Specified Lines,  Next: Case Folding,  Prev: Blank Lines,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.4 Suppressing Differences Whose Lines All Match a Regular Expression",
                    "content": ""
                }
            ]
        },
        "To ignore insertions and deletions of lines that match a 'grep'-style": {
            "content": "regular expression, use the '--ignore-matching-lines=REGEXP' ('-I\nREGEXP') option.  You should escape regular expressions that contain\nshell metacharacters to prevent the shell from expanding them.  For\nexample, 'diff -I '^[[:digit:]]'' ignores all changes to lines beginning\nwith a digit.\n\nHowever, '-I' only ignores the insertion or deletion of lines that\ncontain the regular expression if every changed line in the hunk--every\ninsertion and every deletion--matches the regular expression.  In other\nwords, for each nonignorable change, 'diff' prints the complete set of\nchanges in its vicinity, including the ignorable ones.\n\nYou can specify more than one regular expression for lines to ignore\nby using more than one '-I' option.  'diff' tries to match each line\nagainst each regular expression.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Case Folding,  Next: Brief,  Prev: Specified Lines,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.5 Suppressing Case Differences",
                    "content": "GNU 'diff' can treat lower case letters as equivalent to their upper\ncase counterparts, so that, for example, it considers 'Funky Stuff',\n'funky STUFF', and 'fUNKy stuFf' to all be the same.  To request this,\nuse the '-i' or '--ignore-case' option.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Brief,  Next: Binary,  Prev: Case Folding,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.6 Summarizing Which Files Differ",
                    "content": ""
                }
            ]
        },
        "When you only want to find out whether files are different, and you": {
            "content": "don't care what the differences are, you can use the summary output\nformat.  In this format, instead of showing the differences between the\nfiles, 'diff' simply reports whether files differ.  The '--brief' ('-q')\noption selects this output format.\n\nThis format is especially useful when comparing the contents of two\ndirectories.  It is also much faster than doing the normal line by line\ncomparisons, because 'diff' can stop analyzing the files as soon as it\nknows that there are any differences.\n\nYou can also get a brief indication of whether two files differ by\nusing 'cmp'.  For files that are identical, 'cmp' produces no output.",
            "subsections": []
        },
        "When the files differ, by default, 'cmp' outputs the byte and line": {
            "content": "number where the first difference occurs, or reports that one file is a\nprefix of the other.  You can use the '-s', '--quiet', or '--silent'\noption to suppress that information, so that 'cmp' produces no output\nand reports whether the files differ using only its exit status (*note\nInvoking cmp::).\n\nUnlike 'diff', 'cmp' cannot compare directories; it can only compare\ntwo files.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Binary,  Prev: Brief,  Up: Comparison": {
            "content": "",
            "subsections": [
                {
                    "name": "1.7 Binary Files and Forcing Text Comparisons",
                    "content": ""
                }
            ]
        },
        "If 'diff' thinks that either of the two files it is comparing is binary": {
            "content": "(a non-text file), it normally treats that pair of files much as if the\nsummary output format had been selected (*note Brief::), and reports\nonly that the binary files are different.  This is because line by line\ncomparisons are usually not meaningful for binary files.  This does not\ncount as trouble, even though the resulting output does not capture all\nthe differences.\n\n'diff' determines whether a file is text or binary by checking the\nfirst few bytes in the file; the exact number of bytes is system\ndependent, but it is typically several thousand.  If every byte in that\npart of the file is non-null, 'diff' considers the file to be text;\notherwise it considers the file to be binary.\n\nSometimes you might want to force 'diff' to consider files to be\ntext.  For example, you might be comparing text files that contain null\ncharacters; 'diff' would erroneously decide that those are non-text\nfiles.  Or you might be comparing documents that are in a format used by\na word processing system that uses null characters to indicate special\nformatting.  You can force 'diff' to consider all files to be text\nfiles, and compare them line by line, by using the '--text' ('-a')\noption.  If the files you compare using this option do not in fact\ncontain text, they will probably contain few newline characters, and the\n'diff' output will consist of hunks showing differences between long\nlines of whatever characters the files contain.\n\nYou can also force 'diff' to report only whether files differ (but\nnot how).  Use the '--brief' ('-q') option for this.\n\nIn operating systems that distinguish between text and binary files,\n'diff' normally reads and writes all data as text.  Use the '--binary'\noption to force 'diff' to read and write binary data instead.  This\noption has no effect on a POSIX-compliant system like GNU or traditional",
            "subsections": []
        },
        "Unix.  However, many personal computer operating systems represent the": {
            "content": "end of a line with a carriage return followed by a newline.  On such\nsystems, 'diff' normally ignores these carriage returns on input and\ngenerates them at the end of each output line, but with the '--binary'\noption 'diff' treats each carriage return as just another input\ncharacter, and does not generate a carriage return at the end of each\noutput line.  This can be useful when dealing with non-text files that\nare meant to be interchanged with POSIX-compliant systems.\n\nThe '--strip-trailing-cr' causes 'diff' to treat input lines that end\nin carriage return followed by newline as if they end in plain newline.",
            "subsections": []
        },
        "This can be useful when comparing text that is imperfectly imported from": {
            "content": "many personal computer operating systems.  This option affects how lines\nare read, which in turn affects how they are compared and output.\n\nIf you want to compare two files byte by byte, you can use the 'cmp'\nprogram with the '--verbose' ('-l') option to show the values of each\ndiffering byte in the two files.  With GNU 'cmp', you can also use the\n'-b' or '--print-bytes' option to show the ASCII representation of those\nbytes.  *Note Invoking cmp::, for more information.\n\nIf 'diff3' thinks that any of the files it is comparing is binary (a\nnon-text file), it normally reports an error, because such comparisons\nare usually not useful.  'diff3' uses the same test as 'diff' to decide\nwhether a file is binary.  As with 'diff', if the input files contain a\nfew non-text bytes but otherwise are like text files, you can force\n'diff3' to consider all files to be text files and compare them line by\nline by using the '-a' or '--text' option.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Output Formats,  Next: Incomplete Lines,  Prev: Comparison,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "2 'diff' Output Formats": {
            "content": "'diff' has several mutually exclusive options for output format.  The\nfollowing sections describe each format, illustrating how 'diff' reports\nthe differences between two sample input files.\n\n* Menu:\n\n* Sample diff Input:: Sample 'diff' input files for examples.\n* Context::           Showing differences with the surrounding text.\n* Side by Side::      Showing differences in two columns.\n* Normal::            Showing differences without surrounding text.\n* Scripts::           Generating scripts for other programs.\n* If-then-else::      Merging files with if-then-else.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Sample diff Input,  Next: Context,  Up: Output Formats": {
            "content": "",
            "subsections": [
                {
                    "name": "2.1 Two Sample Input Files",
                    "content": ""
                }
            ]
        },
        "Here are two sample files that we will use in numerous examples to": {
            "content": "illustrate the output of 'diff' and how various options can change it.\n\nThis is the file 'lao':\n\nThe Way that can be told of is not the eternal Way;\nThe name that can be named is not the eternal name.\nThe Nameless is the origin of Heaven and Earth;\nThe Named is the mother of all things.\nTherefore let there always be non-being,\nso we may see their subtlety,\nAnd let there always be being,\nso we may see their outcome.\nThe two are the same,\nBut after they are produced,\nthey have different names.\n\nThis is the file 'tzu':\n\nThe Nameless is the origin of Heaven and Earth;\nThe named is the mother of all things.\n\nTherefore let there always be non-being,\nso we may see their subtlety,\nAnd let there always be being,\nso we may see their outcome.\nThe two are the same,\nBut after they are produced,\nthey have different names.\nThey both may be called deep and profound.\nDeeper and more profound,\nThe door of all subtleties!\n\nIn this example, the first hunk contains just the first two lines of\n'lao', the second hunk contains the fourth line of 'lao' opposing the\nsecond and third lines of 'tzu', and the last hunk contains just the\nlast three lines of 'tzu'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Context,  Next: Side by Side,  Prev: Sample diff Input,  Up: Output Formats": {
            "content": "",
            "subsections": [
                {
                    "name": "2.2 Showing Differences in Their Context",
                    "content": ""
                }
            ]
        },
        "Usually, when you are looking at the differences between files, you will": {
            "content": "also want to see the parts of the files near the lines that differ, to\nhelp you understand exactly what has changed.  These nearby parts of the\nfiles are called the \"context\".\n\nGNU 'diff' provides two output formats that show context around the\ndiffering lines: \"context format\" and \"unified format\".  It can\noptionally show in which function or section of the file the differing\nlines are found.\n\nIf you are distributing new versions of files to other people in the\nform of 'diff' output, you should use one of the output formats that\nshow context so that they can apply the diffs even if they have made\nsmall changes of their own to the files.  'patch' can apply the diffs in\nthis case by searching in the files for the lines of context around the\ndiffering lines; if those lines are actually a few lines away from where\nthe diff says they are, 'patch' can adjust the line numbers accordingly\nand still apply the diff correctly.  *Note Imperfect::, for more\ninformation on using 'patch' to apply imperfect diffs.\n\n* Menu:\n\n* Context Format::  An output format that shows surrounding lines.\n* Unified Format::  A more compact output format that shows context.\n* Sections::        Showing which sections of the files differences are in.\n* Alternate Names:: Showing alternate file names in context headers.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Context Format,  Next: Unified Format,  Up: Context": {
            "content": "",
            "subsections": []
        },
        "The context output format shows several lines of context around the": {
            "content": "lines that differ.  It is the standard format for distributing updates\nto source code.\n\nTo select this output format, use the '--context[=LINES]' ('-C\nLINES') or '-c' option.  The argument LINES that some of these options\ntake is the number of lines of context to show.  If you do not specify\nLINES, it defaults to three.  For proper operation, 'patch' typically\nneeds at least two lines of context.\n\n* Menu:\n\n* Example Context::  Sample output in context format.\n* Less Context::     Another sample with less context.\n* Detailed Context:: A detailed description of the context output format.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example Context,  Next: Less Context,  Up: Context Format": {
            "content": "2.2.1.1 An Example of Context Format\n....................................\n\nHere is the output of 'diff -c lao tzu' (*note Sample diff Input::, for\nthe complete contents of the two files).  Notice that up to three lines\nthat are not different are shown around each line that is different;\nthey are the context lines.  Also notice that the first two hunks have\nrun together, because their contents overlap.\n\n* lao\t2002-02-21 23:30:39.942229878 -0800",
            "subsections": []
        },
        "--- tzu\t2002-02-21 23:30:50.442260588 -0800": {
            "content": "* 1,5\n- The Way that can be told of is not the eternal Way;\n- The name that can be named is not the eternal name.\nThe Nameless is the origin of Heaven and Earth;\n! The Named is the mother of all things.\nTherefore let there always be non-being,\n--- 1,4 ----\nThe Nameless is the origin of Heaven and Earth;\n! The named is the mother of all things.\n!",
            "subsections": []
        },
        "And let there always be being,": {
            "content": "* 9,11\n--- 8,13 ----\nThe two are the same,\nBut after they are produced,\nthey have different names.\n+ They both may be called deep and profound.\n+ Deeper and more profound,\n+ The door of all subtleties!\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Less Context,  Next: Detailed Context,  Prev: Example Context,  Up: Context Format": {
            "content": "2.2.1.2 An Example of Context Format with Less Context\n......................................................\n\nHere is the output of 'diff -C 1 lao tzu' (*note Sample diff Input::,\nfor the complete contents of the two files).  Notice that at most one\ncontext line is reported here.\n\n* lao\t2002-02-21 23:30:39.942229878 -0800",
            "subsections": []
        },
        "Therefore let there always be non-being,": {
            "content": "* 11\n--- 10,13 ----\nthey have different names.\n+ They both may be called deep and profound.\n+ Deeper and more profound,\n+ The door of all subtleties!\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Detailed Context,  Prev: Less Context,  Up: Context Format": {
            "content": "2.2.1.3 Detailed Description of Context Format\n..............................................\n",
            "subsections": []
        },
        "The context output format starts with a two-line header, which looks": {
            "content": "like this:\n\n* FROM-FILE FROM-FILE-MODIFICATION-TIME\n--- TO-FILE TO-FILE-MODIFICATION TIME\n\nThe timestamp normally looks like '2002-02-21 23:30:39.942229878\n-0800' to indicate the date, time with fractional seconds, and time zone\nin Internet RFC 2822 format (ftp://ftp.isi.edu/in-notes/rfc2822.txt).\n(The fractional seconds are omitted on hosts that do not support\nfractional timestamps.)  However, a traditional timestamp like 'Thu Feb\n21 23:30:39 2002' is used if the 'LCTIME' locale category is either 'C'\nor 'POSIX'.\n\nYou can change the header's content with the '--label=LABEL' option;\nsee *note Alternate Names::.\n\nNext come one or more hunks of differences; each hunk shows one area\nwhere the files differ.  Context format hunks look like this:\n\n*\n* FROM-FILE-LINE-NUMBERS\nFROM-FILE-LINE\nFROM-FILE-LINE...\n--- TO-FILE-LINE-NUMBERS ----\nTO-FILE-LINE\nTO-FILE-LINE...\n\nIf a hunk contains two or more lines, its line numbers look like\n'START,END'.  Otherwise only its end line number appears.  An empty hunk\nis considered to end at the line that precedes the hunk.\n\nThe lines of context around the lines that differ start with two\nspace characters.  The lines that differ between the two files start\nwith one of the following indicator characters, followed by a space\ncharacter:\n\n'!'\nA line that is part of a group of one or more lines that changed\nbetween the two files.  There is a corresponding group of lines\nmarked with '!' in the part of this hunk for the other file.\n\n'+'\nAn \"inserted\" line in the second file that corresponds to nothing\nin the first file.\n\n'-'\nA \"deleted\" line in the first file that corresponds to nothing in\nthe second file.\n\nIf all of the changes in a hunk are insertions, the lines of\nFROM-FILE are omitted.  If all of the changes are deletions, the lines\nof TO-FILE are omitted.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Unified Format,  Next: Sections,  Prev: Context Format,  Up: Context": {
            "content": "",
            "subsections": []
        },
        "The unified output format is a variation on the context format that is": {
            "content": "more compact because it omits redundant context lines.  To select this\noutput format, use the '--unified[=LINES]' ('-U LINES'), or '-u' option.",
            "subsections": []
        },
        "The argument LINES is the number of lines of context to show.  When it": {
            "content": "is not given, it defaults to three.\n\nIn the early 1990s, only GNU 'diff' could produce this format and\nonly GNU 'patch' could automatically apply diffs in this format.  For\nproper operation, 'patch' typically needs at least three lines of\ncontext.\n\n* Menu:\n\n* Example Unified::  Sample output in unified format.\n* Detailed Unified:: A detailed description of unified format.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example Unified,  Next: Detailed Unified,  Up: Unified Format": {
            "content": "2.2.2.1 An Example of Unified Format\n....................................\n\nHere is the output of the command 'diff -u lao tzu' (*note Sample diff\nInput::, for the complete contents of the two files):\n\n--- lao\t2002-02-21 23:30:39.942229878 -0800\n+++ tzu\t2002-02-21 23:30:50.442260588 -0800\n@@ -1,7 +1,6 @@\n-The Way that can be told of is not the eternal Way;\n-The name that can be named is not the eternal name.\nThe Nameless is the origin of Heaven and Earth;\n-The Named is the mother of all things.\n+The named is the mother of all things.\n+\nTherefore let there always be non-being,\nso we may see their subtlety,\nAnd let there always be being,\n@@ -9,3 +8,6 @@\nThe two are the same,\nBut after they are produced,\nthey have different names.\n+They both may be called deep and profound.\n+Deeper and more profound,\n+The door of all subtleties!\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Detailed Unified,  Prev: Example Unified,  Up: Unified Format": {
            "content": "2.2.2.2 Detailed Description of Unified Format\n..............................................\n",
            "subsections": []
        },
        "The unified output format starts with a two-line header, which looks": {
            "content": "like this:\n\n--- FROM-FILE FROM-FILE-MODIFICATION-TIME\n+++ TO-FILE TO-FILE-MODIFICATION-TIME\n\nThe timestamp looks like '2002-02-21 23:30:39.942229878 -0800' to\nindicate the date, time with fractional seconds, and time zone.  The\nfractional seconds are omitted on hosts that do not support fractional\ntimestamps.\n\nYou can change the header's content with the '--label=LABEL' option.\n*Note Alternate Names::.\n\nNext come one or more hunks of differences; each hunk shows one area\nwhere the files differ.  Unified format hunks look like this:\n\n@@ FROM-FILE-LINE-NUMBERS TO-FILE-LINE-NUMBERS @@\nLINE-FROM-EITHER-FILE\nLINE-FROM-EITHER-FILE...\n\nIf a hunk contains just one line, only its start line number appears.",
            "subsections": []
        },
        "Otherwise its line numbers look like 'START,COUNT'.  An empty hunk is": {
            "content": "considered to start at the line that follows the hunk.\n\nIf a hunk and its context contain two or more lines, its line numbers\nlook like 'START,COUNT'.  Otherwise only its end line number appears.\nAn empty hunk is considered to end at the line that precedes the hunk.\n\nThe lines common to both files begin with a space character.  The\nlines that actually differ between the two files have one of the\nfollowing indicator characters in the left print column:\n\n'+'\nA line was added here to the first file.\n\n'-'\nA line was removed here from the first file.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Sections,  Next: Alternate Names,  Prev: Unified Format,  Up: Context": {
            "content": "",
            "subsections": []
        },
        "Sometimes you might want to know which part of the files each change": {
            "content": "falls in.  If the files are source code, this could mean which function\nwas changed.  If the files are documents, it could mean which chapter or\nappendix was changed.  GNU 'diff' can show this by displaying the\nnearest section heading line that precedes the differing lines.  Which\nlines are \"section headings\" is determined by a regular expression.\n\n* Menu:\n\n* Specified Headings::  Showing headings that match regular expressions.\n* C Function Headings:: Showing headings of C functions.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Specified Headings,  Next: C Function Headings,  Up: Sections": {
            "content": "2.2.3.1 Showing Lines That Match Regular Expressions\n....................................................\n",
            "subsections": []
        },
        "To show in which sections differences occur for files that are not": {
            "content": "source code for C or similar languages, use the\n'--show-function-line=REGEXP' ('-F REGEXP') option.  'diff' considers\nlines that match the 'grep'-style regular expression REGEXP to be the\nbeginning of a section of the file.  Here are suggested regular\nexpressions for some common languages:\n\n'^[[:alpha:]$]'\nC, C++, Prolog\n'^('\nLisp\n'^@node'\nTexinfo\n\nThis option does not automatically select an output format; in order\nto use it, you must select the context format (*note Context Format::)\nor unified format (*note Unified Format::).  In other output formats it\nhas no effect.\n\nThe '--show-function-line' ('-F') option finds the nearest unchanged\nline that precedes each hunk of differences and matches the given\nregular expression.  Then it adds that line to the end of the line of\nasterisks in the context format, or to the '@@' line in unified format.",
            "subsections": []
        },
        "If no matching line exists, this option leaves the output for that hunk": {
            "content": "unchanged.  If that line is more than 40 characters long, it outputs\nonly the first 40 characters.  You can specify more than one regular\nexpression for such lines; 'diff' tries to match each line against each\nregular expression, starting with the last one given.  This means that\nyou can use '-p' and '-F' together, if you wish.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: C Function Headings,  Prev: Specified Headings,  Up: Sections": {
            "content": "2.2.3.2 Showing C Function Headings\n...................................\n",
            "subsections": []
        },
        "To show in which functions differences occur for C and similar": {
            "content": "languages, you can use the '--show-c-function' ('-p') option.  This\noption automatically defaults to the context output format (*note",
            "subsections": []
        },
        "Context Format::), with the default number of lines of context.  You can": {
            "content": "override that number with '-C LINES' elsewhere in the command line.  You\ncan override both the format and the number with '-U LINES' elsewhere in\nthe command line.\n\nThe '--show-c-function' ('-p') option is equivalent to '-F\n'^[[:alpha:]$]'' if the unified format is specified, otherwise '-c -F\n'^[[:alpha:]$]'' (*note Specified Headings::).  GNU 'diff' provides\nthis option for the sake of convenience.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Alternate Names,  Prev: Sections,  Up: Context": {
            "content": "",
            "subsections": []
        },
        "If you are comparing two files that have meaningless or uninformative": {
            "content": "names, you might want 'diff' to show alternate names in the header of\nthe context and unified output formats.  To do this, use the\n'--label=LABEL' option.  The first time you give this option, its\nargument replaces the name and date of the first file in the header; the\nsecond time, its argument replaces the name and date of the second file.",
            "subsections": []
        },
        "If you give this option more than twice, 'diff' reports an error.  The": {
            "content": "'--label' option does not affect the file names in the 'pr' header when\nthe '-l' or '--paginate' option is used (*note Pagination::).\n\nHere are the first two lines of the output from 'diff -C 2\n--label=original --label=modified lao tzu':\n\n* original\n--- modified\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Side by Side,  Next: Normal,  Prev: Context,  Up: Output Formats": {
            "content": "",
            "subsections": [
                {
                    "name": "2.3 Showing Differences Side by Side",
                    "content": "'diff' can produce a side by side difference listing of two files.  The\nfiles are listed in two columns with a gutter between them.  The gutter\ncontains one of the following markers:\n\nwhite space\nThe corresponding lines are in common.  That is, either the lines\nare identical, or the difference is ignored because of one of the\n'--ignore' options (*note White Space::).\n\n'|'\nThe corresponding lines differ, and they are either both complete\nor both incomplete.\n\n'<'\nThe files differ and only the first file contains the line.\n\n'>'\nThe files differ and only the second file contains the line.\n\n'('\nOnly the first file contains the line, but the difference is\nignored.\n\n')'\nOnly the second file contains the line, but the difference is\nignored.\n\n'\\'\nThe corresponding lines differ, and only the first line is\nincomplete.\n\n'/'\nThe corresponding lines differ, and only the second line is\nincomplete.\n\nNormally, an output line is incomplete if and only if the lines that\nit contains are incomplete.  *Note Incomplete Lines::.  However, when an\noutput line represents two differing lines, one might be incomplete\nwhile the other is not.  In this case, the output line is complete, but\nits the gutter is marked '\\' if the first line is incomplete, '/' if the\nsecond line is.\n\nSide by side format is sometimes easiest to read, but it has\nlimitations.  It generates much wider output than usual, and truncates\nlines that are too long to fit.  Also, it relies on lining up output\nmore heavily than usual, so its output looks particularly bad if you use\nvarying width fonts, nonstandard tab stops, or nonprinting characters.\n\nYou can use the 'sdiff' command to interactively merge side by side\ndifferences.  *Note Interactive Merging::, for more information on\nmerging files.\n\n* Menu:\n\n* Side by Side Format::  Controlling side by side output format.\n* Example Side by Side:: Sample side by side output.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Side by Side Format,  Next: Example Side by Side,  Up: Side by Side": {
            "content": "",
            "subsections": []
        },
        "The '--side-by-side' ('-y') option selects side by side format.  Because": {
            "content": "side by side output lines contain two input lines, the output is wider\nthan usual: normally 130 print columns, which can fit onto a traditional\nprinter line.  You can set the width of the output with the\n'--width=COLUMNS' ('-W COLUMNS') option.  The output is split into two\nhalves of equal width, separated by a small gutter to mark differences;\nthe right half is aligned to a tab stop so that tabs line up.  Input\nlines that are too long to fit in half of an output line are truncated\nfor output.\n\nThe '--left-column' option prints only the left column of two common\nlines.  The '--suppress-common-lines' option suppresses common lines\nentirely.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example Side by Side,  Prev: Side by Side Format,  Up: Side by Side": {
            "content": "Here is the output of the command 'diff -y -W 72 lao tzu' (*note Sample\ndiff Input::, for the complete contents of the two files).\n\nThe Way that can be told of is n   <\nThe name that can be named is no   <\nThe Nameless is the origin of He        The Nameless is the origin of He\nThe Named is the mother of all t   |    The named is the mother of all t\n>\nTherefore let there always be no        Therefore let there always be no\nso we may see their subtlety,           so we may see their subtlety,\nAnd let there always be being,          And let there always be being,\nso we may see their outcome.            so we may see their outcome.\nThe two are the same,                   The two are the same,\nBut after they are produced,            But after they are produced,\nthey have different names.              they have different names.\n>    They both may be called deep and\n>    Deeper and more profound,\n>    The door of all subtleties!\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Normal,  Next: Scripts,  Prev: Side by Side,  Up: Output Formats": {
            "content": "",
            "subsections": [
                {
                    "name": "2.4 Showing Differences Without Context",
                    "content": "The \"normal\" 'diff' output format shows each hunk of differences without\nany surrounding context.  Sometimes such output is the clearest way to\nsee how lines have changed, without the clutter of nearby unchanged\nlines (although you can get similar results with the context or unified\nformats by using 0 lines of context).  However, this format is no longer\nwidely used for sending out patches; for that purpose, the context\nformat (*note Context Format::) and the unified format (*note Unified"
                }
            ]
        },
        "Format::) are superior.  Normal format is the default for compatibility": {
            "content": "with older versions of 'diff' and the POSIX standard.  Use the\n'--normal' option to select this output format explicitly.\n\n* Menu:\n\n* Example Normal::  Sample output in the normal format.\n* Detailed Normal:: A detailed description of normal output format.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example Normal,  Next: Detailed Normal,  Up: Normal": {
            "content": "Here is the output of the command 'diff lao tzu' (*note Sample diff",
            "subsections": []
        },
        "Input::, for the complete contents of the two files).  Notice that it": {
            "content": "shows only the lines that are different between the two files.\n\n1,2d0\n< The Way that can be told of is not the eternal Way;\n< The name that can be named is not the eternal name.\n4c2,3\n> The named is the mother of all things.\n>\n11a11,13\n> They both may be called deep and profound.\n> Deeper and more profound,\n> The door of all subtleties!\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Detailed Normal,  Prev: Example Normal,  Up: Normal": {
            "content": "",
            "subsections": []
        },
        "The normal output format consists of one or more hunks of differences;": {
            "content": "each hunk shows one area where the files differ.  Normal format hunks\nlook like this:\n\nCHANGE-COMMAND\n< FROM-FILE-LINE\n> TO-FILE-LINE\n> TO-FILE-LINE...\n\nThere are three types of change commands.  Each consists of a line\nnumber or comma-separated range of lines in the first file, a single\ncharacter indicating the kind of change to make, and a line number or\ncomma-separated range of lines in the second file.  All line numbers are\nthe original line numbers in each file.  The types of change commands\nare:\n\n'LaR'\nAdd the lines in range R of the second file after line L of the\nfirst file.  For example, '8a12,15' means append lines 12-15 of\nfile 2 after line 8 of file 1; or, if changing file 2 into file 1,\ndelete lines 12-15 of file 2.\n\n'FcT'\nReplace the lines in range F of the first file with lines in range\nT of the second file.  This is like a combined add and delete, but\nmore compact.  For example, '5,7c8,10' means change lines 5-7 of\nfile 1 to read as lines 8-10 of file 2; or, if changing file 2 into\nfile 1, change lines 8-10 of file 2 to read as lines 5-7 of file 1.\n\n'RdL'\nDelete the lines in range R from the first file; line L is where\nthey would have appeared in the second file had they not been\ndeleted.  For example, '5,7d3' means delete lines 5-7 of file 1;\nor, if changing file 2 into file 1, append lines 5-7 of file 1\nafter line 3 of file 2.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Scripts,  Next: If-then-else,  Prev: Normal,  Up: Output Formats": {
            "content": "",
            "subsections": [
                {
                    "name": "2.5 Making Edit Scripts",
                    "content": ""
                }
            ]
        },
        "Several output modes produce command scripts for editing FROM-FILE to": {
            "content": "produce TO-FILE.\n\n* Menu:\n\n* ed Scripts:: Using 'diff' to produce commands for 'ed'.\n* Forward ed:: Making forward 'ed' scripts.\n* RCS::        A special 'diff' output format used by RCS.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: ed Scripts,  Next: Forward ed,  Up: Scripts": {
            "content": "'diff' can produce commands that direct the 'ed' text editor to change\nthe first file into the second file.  Long ago, this was the only output\nmode that was suitable for editing one file into another automatically;\ntoday, with 'patch', it is almost obsolete.  Use the '--ed' ('-e')\noption to select this output format.\n\nLike the normal format (*note Normal::), this output format does not\nshow any context; unlike the normal format, it does not include the\ninformation necessary to apply the diff in reverse (to produce the first\nfile if all you have is the second file and the diff).\n\nIf the file 'd' contains the output of 'diff -e old new', then the\ncommand '(cat d && echo w) | ed - old' edits 'old' to make it a copy of\n'new'.  More generally, if 'd1', 'd2', ..., 'dN' contain the outputs of\n'diff -e old new1', 'diff -e new1 new2', ..., 'diff -e newN-1 newN',\nrespectively, then the command '(cat d1 d2 ... dN && echo w) | ed - old'\nedits 'old' to make it a copy of 'newN'.\n\n* Menu:\n\n* Example ed::  A sample 'ed' script.\n* Detailed ed:: A detailed description of 'ed' format.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example ed,  Next: Detailed ed,  Up: ed Scripts": {
            "content": "2.5.1.1 Example 'ed' Script\n...........................\n\nHere is the output of 'diff -e lao tzu' (*note Sample diff Input::, for\nthe complete contents of the two files):\n\n11a\nThey both may be called deep and profound.\nDeeper and more profound,\nThe door of all subtleties!\n.\n4c\nThe named is the mother of all things.\n\n.\n1,2d\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Detailed ed,  Prev: Example ed,  Up: ed Scripts": {
            "content": "2.5.1.2 Detailed Description of 'ed' Format\n...........................................\n\nThe 'ed' output format consists of one or more hunks of differences.",
            "subsections": []
        },
        "The changes closest to the ends of the files come first so that commands": {
            "content": "that change the number of lines do not affect how 'ed' interprets line\nnumbers in succeeding commands.  'ed' format hunks look like this:\n\nCHANGE-COMMAND\nTO-FILE-LINE\nTO-FILE-LINE...\n.\n\nBecause 'ed' uses a single period on a line to indicate the end of\ninput, GNU 'diff' protects lines of changes that contain a single period\non a line by writing two periods instead, then writing a subsequent 'ed'\ncommand to change the two periods into one.  The 'ed' format cannot\nrepresent an incomplete line, so if the second file ends in a changed\nincomplete line, 'diff' reports an error and then pretends that a\nnewline was appended.\n\nThere are three types of change commands.  Each consists of a line\nnumber or comma-separated range of lines in the first file and a single\ncharacter indicating the kind of change to make.  All line numbers are\nthe original line numbers in the file.  The types of change commands\nare:\n\n'La'\nAdd text from the second file after line L in the first file.  For\nexample, '8a' means to add the following lines after line 8 of file\n1.\n\n'Rc'\nReplace the lines in range R in the first file with the following\nlines.  Like a combined add and delete, but more compact.  For\nexample, '5,7c' means change lines 5-7 of file 1 to read as the\ntext file 2.\n\n'Rd'\nDelete the lines in range R from the first file.  For example,\n'5,7d' means delete lines 5-7 of file 1.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Forward ed,  Next: RCS,  Prev: ed Scripts,  Up: Scripts": {
            "content": "'diff' can produce output that is like an 'ed' script, but with hunks in\nforward (front to back) order.  The format of the commands is also\nchanged slightly: command characters precede the lines they modify,\nspaces separate line numbers in ranges, and no attempt is made to\ndisambiguate hunk lines consisting of a single period.  Like 'ed'\nformat, forward 'ed' format cannot represent incomplete lines.\n\nForward 'ed' format is not very useful, because neither 'ed' nor\n'patch' can apply diffs in this format.  It exists mainly for\ncompatibility with older versions of 'diff'.  Use the '-f' or\n'--forward-ed' option to select it.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: RCS,  Prev: Forward ed,  Up: Scripts": {
            "content": "",
            "subsections": []
        },
        "The RCS output format is designed specifically for use by the Revision": {
            "content": "",
            "subsections": []
        },
        "Control System, which is a set of free programs used for organizing": {
            "content": "different versions and systems of files.  Use the '--rcs' ('-n') option\nto select this output format.  It is like the forward 'ed' format (*note",
            "subsections": []
        },
        "Forward ed::), but it can represent arbitrary changes to the contents of": {
            "content": "a file because it avoids the forward 'ed' format's problems with lines\nconsisting of a single period and with incomplete lines.  Instead of\nending text sections with a line consisting of a single period, each\ncommand specifies the number of lines it affects; a combination of the\n'a' and 'd' commands are used instead of 'c'.  Also, if the second file\nends in a changed incomplete line, then the output also ends in an\nincomplete line.\n\nHere is the output of 'diff -n lao tzu' (*note Sample diff Input::,\nfor the complete contents of the two files):\n\nd1 2\nd4 1\na4 2\nThe named is the mother of all things.\n\na11 3\nThey both may be called deep and profound.\nDeeper and more profound,\nThe door of all subtleties!\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: If-then-else,  Prev: Scripts,  Up: Output Formats": {
            "content": "",
            "subsections": [
                {
                    "name": "2.6 Merging Files with If-then-else",
                    "content": ""
                }
            ]
        },
        "You can use 'diff' to merge two files of C source code.  The output of": {
            "content": "'diff' in this format contains all the lines of both files.  Lines\ncommon to both files are output just once; the differing parts are\nseparated by the C preprocessor directives '#ifdef NAME' or '#ifndef\nNAME', '#else', and '#endif'.  When compiling the output, you select\nwhich version to use by either defining or leaving undefined the macro\nNAME.\n\nTo merge two files, use 'diff' with the '-D NAME' or '--ifdef=NAME'\noption.  The argument NAME is the C preprocessor identifier to use in\nthe '#ifdef' and '#ifndef' directives.\n\nFor example, if you change an instance of 'wait (&s)' to 'waitpid\n(-1, &s, 0)' and then merge the old and new files with the\n'--ifdef=HAVEWAITPID' option, then the affected part of your code might\nlook like this:\n\ndo {\n#ifndef HAVEWAITPID\nif ((w = wait (&s)) < 0  &&  errno != EINTR)\n#else /* HAVEWAITPID */\nif ((w = waitpid (-1, &s, 0)) < 0  &&  errno != EINTR)\n#endif /* HAVEWAITPID */\nreturn w;\n} while (w != child);\n\nYou can specify formats for languages other than C by using line\ngroup formats and line formats, as described in the next sections.\n\n* Menu:\n\n* Line Group Formats::    Formats for general if-then-else line groups.\n* Line Formats::          Formats for each line in a line group.\n* Example If-then-else::  Sample if-then-else format output.\n* Detailed If-then-else:: A detailed description of if-then-else format.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Line Group Formats,  Next: Line Formats,  Up: If-then-else": {
            "content": "",
            "subsections": []
        },
        "Line group formats let you specify formats suitable for many": {
            "content": "applications that allow if-then-else input, including programming\nlanguages and text formatting languages.  A line group format specifies\nthe output format for a contiguous group of similar lines.\n\nFor example, the following command compares the TeX files 'old' and\n'new', and outputs a merged file in which old regions are surrounded by\n'\\begin{em}'-'\\end{em}' lines, and new regions are surrounded by\n'\\begin{bf}'-'\\end{bf}' lines.\n\ndiff \\\n--old-group-format='\\begin{em}\n%<\\end{em}\n' \\\n--new-group-format='\\begin{bf}\n%>\\end{bf}\n' \\\nold new\n\nThe following command is equivalent to the above example, but it is a\nlittle more verbose, because it spells out the default line group\nformats.\n\ndiff \\\n--old-group-format='\\begin{em}\n%<\\end{em}\n' \\\n--new-group-format='\\begin{bf}\n%>\\end{bf}\n' \\\n--unchanged-group-format='%=' \\\n--changed-group-format='\\begin{em}\n%<\\end{em}\n\\begin{bf}\n%>\\end{bf}\n' \\\nold new\n\nHere is a more advanced example, which outputs a diff listing with\nheaders containing line numbers in a \"plain English\" style.\n\ndiff \\\n--unchanged-group-format='' \\\n--old-group-format='-------- %dn line%(n=1?:s) deleted at %df:\n%<' \\\n--new-group-format='-------- %dN line%(N=1?:s) added after %de:\n%>' \\\n--changed-group-format='-------- %dn line%(n=1?:s) changed at %df:\n%<-------- to:\n%>' \\\nold new\n\nTo specify a line group format, use 'diff' with one of the options\nlisted below.  You can specify up to four line group formats, one for\neach kind of line group.  You should quote FORMAT, because it typically\ncontains shell metacharacters.\n\n'--old-group-format=FORMAT'\nThese line groups are hunks containing only lines from the first\nfile.  The default old group format is the same as the changed\ngroup format if it is specified; otherwise it is a format that\noutputs the line group as-is.\n\n'--new-group-format=FORMAT'\nThese line groups are hunks containing only lines from the second\nfile.  The default new group format is same as the changed group\nformat if it is specified; otherwise it is a format that outputs\nthe line group as-is.\n\n'--changed-group-format=FORMAT'\nThese line groups are hunks containing lines from both files.  The\ndefault changed group format is the concatenation of the old and\nnew group formats.\n\n'--unchanged-group-format=FORMAT'\nThese line groups contain lines common to both files.  The default\nunchanged group format is a format that outputs the line group\nas-is.\n\nIn a line group format, ordinary characters represent themselves;\nconversion specifications start with '%' and have one of the following\nforms.\n\n'%<'\nstands for the lines from the first file, including the trailing\nnewline.  Each line is formatted according to the old line format\n(*note Line Formats::).\n\n'%>'\nstands for the lines from the second file, including the trailing\nnewline.  Each line is formatted according to the new line format.\n\n'%='\nstands for the lines common to both files, including the trailing\nnewline.  Each line is formatted according to the unchanged line\nformat.\n\n'%%'\nstands for '%'.\n\n'%c'C''\nwhere C is a single character, stands for C.  C may not be a\nbackslash or an apostrophe.  For example, '%c':'' stands for a\ncolon, even inside the then-part of an if-then-else format, which a\ncolon would normally terminate.\n\n'%c'\\O''\nwhere O is a string of 1, 2, or 3 octal digits, stands for the\ncharacter with octal code O.  For example, '%c'\\0'' stands for a\nnull character.\n\n'FN'\nwhere F is a 'printf' conversion specification and N is one of the\nfollowing letters, stands for N's value formatted with F.\n\n'e'\nThe line number of the line just before the group in the old\nfile.\n\n'f'\nThe line number of the first line in the group in the old\nfile; equals E + 1.\n\n'l'\nThe line number of the last line in the group in the old file.\n\n'm'\nThe line number of the line just after the group in the old\nfile; equals L + 1.\n\n'n'\nThe number of lines in the group in the old file; equals L - F\n+ 1.\n\n'E, F, L, M, N'\nLikewise, for lines in the new file.\n\nThe 'printf' conversion specification can be '%d', '%o', '%x', or\n'%X', specifying decimal, octal, lower case hexadecimal, or upper\ncase hexadecimal output respectively.  After the '%' the following\noptions can appear in sequence: a series of zero or more flags; an\ninteger specifying the minimum field width; and a period followed\nby an optional integer specifying the minimum number of digits.\nThe flags are '-' for left-justification, ''' for separating the\ndigit into groups as specified by the 'LCNUMERIC' locale category,\nand '0' for padding with zeros instead of spaces.  For example,\n'%5dN' prints the number of new lines in the group in a field of\nwidth 5 characters, using the 'printf' format '\"%5d\"'.\n\n'(A=B?T:E)'\nIf A equals B then T else E.  A and B are each either a decimal\nconstant or a single letter interpreted as above.  This format spec\nis equivalent to T if A's value equals B's; otherwise it is\nequivalent to E.\n\nFor example, '%(N=0?no:%dN) line%(N=1?:s)' is equivalent to 'no\nlines' if N (the number of lines in the group in the new file) is\n0, to '1 line' if N is 1, and to '%dN lines' otherwise.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Line Formats,  Next: Example If-then-else,  Prev: Line Group Formats,  Up: If-then-else": {
            "content": "",
            "subsections": []
        },
        "Line formats control how each line taken from an input file is output as": {
            "content": "part of a line group in if-then-else format.\n\nFor example, the following command outputs text with a one-character\nchange indicator to the left of the text.  The first character of output\nis '-' for deleted lines, '|' for added lines, and a space for unchanged\nlines.  The formats contain newline characters where newlines are\ndesired on output.\n\ndiff \\\n--old-line-format='-%l\n' \\\n--new-line-format='|%l\n' \\\n--unchanged-line-format=' %l\n' \\\nold new\n\nTo specify a line format, use one of the following options.  You\nshould quote FORMAT, since it often contains shell metacharacters.\n\n'--old-line-format=FORMAT'\nformats lines just from the first file.\n\n'--new-line-format=FORMAT'\nformats lines just from the second file.\n\n'--unchanged-line-format=FORMAT'\nformats lines common to both files.\n\n'--line-format=FORMAT'\nformats all lines; in effect, it sets all three above options\nsimultaneously.\n\nIn a line format, ordinary characters represent themselves;\nconversion specifications start with '%' and have one of the following\nforms.\n\n'%l'\nstands for the contents of the line, not counting its trailing\nnewline (if any).  This format ignores whether the line is\nincomplete; *Note Incomplete Lines::.\n\n'%L'\nstands for the contents of the line, including its trailing newline\n(if any).  If a line is incomplete, this format preserves its\nincompleteness.\n\n'%%'\nstands for '%'.\n\n'%c'C''\nwhere C is a single character, stands for C.  C may not be a\nbackslash or an apostrophe.  For example, '%c':'' stands for a\ncolon.\n\n'%c'\\O''\nwhere O is a string of 1, 2, or 3 octal digits, stands for the\ncharacter with octal code O.  For example, '%c'\\0'' stands for a\nnull character.\n\n'Fn'\nwhere F is a 'printf' conversion specification, stands for the line\nnumber formatted with F.  For example, '%.5dn' prints the line\nnumber using the 'printf' format '\"%.5d\"'.  *Note Line Group\nFormats::, for more about printf conversion specifications.\n\nThe default line format is '%l' followed by a newline character.\n\nIf the input contains tab characters and it is important that they\nline up on output, you should ensure that '%l' or '%L' in a line format\nis just after a tab stop (e.g. by preceding '%l' or '%L' with a tab\ncharacter), or you should use the '-t' or '--expand-tabs' option.\n\nTaken together, the line and line group formats let you specify many\ndifferent formats.  For example, the following command uses a format\nsimilar to normal 'diff' format.  You can tailor this command to get\nfine control over 'diff' output.\n\ndiff \\\n--old-line-format='< %l\n' \\\n--new-line-format='> %l\n' \\\n--old-group-format='%df%(f=l?:,%dl)d%dE\n%<' \\\n--new-group-format='%dea%dF%(F=L?:,%dL)\n%>' \\\n--changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)\n%<---\n%>' \\\n--unchanged-group-format='' \\\nold new\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example If-then-else,  Next: Detailed If-then-else,  Prev: Line Formats,  Up: If-then-else": {
            "content": "Here is the output of 'diff -DTWO lao tzu' (*note Sample diff Input::,\nfor the complete contents of the two files):\n\n#ifndef TWO\nThe Way that can be told of is not the eternal Way;\nThe name that can be named is not the eternal name.\n#endif /* ! TWO */\nThe Nameless is the origin of Heaven and Earth;\n#ifndef TWO\nThe Named is the mother of all things.\n#else /* TWO */\nThe named is the mother of all things.\n\n#endif /* TWO */\nTherefore let there always be non-being,\nso we may see their subtlety,\nAnd let there always be being,\nso we may see their outcome.\nThe two are the same,\nBut after they are produced,\nthey have different names.\n#ifdef TWO\nThey both may be called deep and profound.\nDeeper and more profound,\nThe door of all subtleties!\n#endif /* TWO */\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Detailed If-then-else,  Prev: Example If-then-else,  Up: If-then-else": {
            "content": "",
            "subsections": []
        },
        "For lines common to both files, 'diff' uses the unchanged line group": {
            "content": "format.  For each hunk of differences in the merged output format, if\nthe hunk contains only lines from the first file, 'diff' uses the old\nline group format; if the hunk contains only lines from the second file,\n'diff' uses the new group format; otherwise, 'diff' uses the changed\ngroup format.\n\nThe old, new, and unchanged line formats specify the output format of\nlines from the first file, lines from the second file, and lines common\nto both files, respectively.\n\nThe option '--ifdef=NAME' is equivalent to the following sequence of\noptions using shell syntax:\n\n--old-group-format='#ifndef NAME\n%<#endif /* ! NAME */\n' \\\n--new-group-format='#ifdef NAME\n%>#endif /* NAME */\n' \\\n--unchanged-group-format='%=' \\\n--changed-group-format='#ifndef NAME\n%<#else /* NAME */\n%>#endif /* NAME */\n'\n\nYou should carefully check the 'diff' output for proper nesting.  For\nexample, when using the '-D NAME' or '--ifdef=NAME' option, you should\ncheck that if the differing lines contain any of the C preprocessor\ndirectives '#ifdef', '#ifndef', '#else', '#elif', or '#endif', they are\nnested properly and match.  If they don't, you must make corrections\nmanually.  It is a good idea to carefully check the resulting code\nanyway to make sure that it really does what you want it to; depending\non how the input files were produced, the output might contain duplicate\nor otherwise incorrect code.\n\nThe 'patch' '-D NAME' option behaves like the 'diff' '-D NAME'\noption, except it operates on a file and a diff to produce a merged\nfile.  *Note patch Options::.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Incomplete Lines,  Next: Comparing Directories,  Prev: Output Formats,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "3 Incomplete Lines": {
            "content": "",
            "subsections": []
        },
        "When an input file ends in a non-newline character, its last line is": {
            "content": "called an \"incomplete line\" because its last character is not a newline.\nAll other lines are called \"full lines\" and end in a newline character.",
            "subsections": []
        },
        "Incomplete lines do not match full lines unless differences in white": {
            "content": "space are ignored (*note White Space::).\n\nAn incomplete line is normally distinguished on output from a full\nline by a following line that starts with '\\'.  However, the RCS format\n(*note RCS::) outputs the incomplete line as-is, without any trailing\nnewline or following line.  The side by side format normally represents\nincomplete lines as-is, but in some cases uses a '\\' or '/' gutter\nmarker.  *Note Side by Side::.  The if-then-else line format preserves a\nline's incompleteness with '%L', and discards the newline with '%l'.\n*Note Line Formats::.  Finally, with the 'ed' and forward 'ed' output\nformats (*note Output Formats::) 'diff' cannot represent an incomplete\nline, so it pretends there was a newline and reports an error.\n\nFor example, suppose 'F' and 'G' are one-byte files that contain just\n'f' and 'g', respectively.  Then 'diff F G' outputs\n\n1c1\n< f\n> g\n\\ No newline at end of file\n\n(The exact message may differ in non-English locales.)  'diff -n F G'\noutputs the following without a trailing newline:\n\nd1 1\na1 1\ng\n\n'diff -e F G' reports two errors and outputs the following:\n\n1c\ng\n.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Comparing Directories,  Next: Adjusting Output,  Prev: Incomplete Lines,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "4 Comparing Directories": {
            "content": "",
            "subsections": []
        },
        "You can use 'diff' to compare some or all of the files in two directory": {
            "content": "trees.  When both file name arguments to 'diff' are directories, it\ncompares each file that is contained in both directories, examining file\nnames in alphabetical order as specified by the 'LCCOLLATE' locale\ncategory.  Normally 'diff' is silent about pairs of files that contain\nno differences, but if you use the '--report-identical-files' ('-s')\noption, it reports pairs of identical files.  Normally 'diff' reports\nsubdirectories common to both directories without comparing\nsubdirectories' files, but if you use the '-r' or '--recursive' option,\nit compares every corresponding pair of files in the directory trees, as\nmany levels deep as they go.\n\nIf only one file exists, 'diff' normally does not show its contents;\nit merely reports that one file exists but the other does not.  You can\nmake 'diff' act as though the missing file is empty, so that it outputs\nthe entire contents of the file that actually exists.  (It is output as\neither an insertion or a deletion, depending on whether the missing file\nis in the first or the second position.)  To do this, use the\n'--new-file' ('-N') option.  This option affects command-line arguments\nas well as files found via directory traversal; for example, 'diff -N a\nb' treats 'a' as empty if 'a' does not exist but 'b' does.\n\nIf the older directory contains large files that are not in the newer\ndirectory, you can make the patch smaller by using the\n'--unidirectional-new-file' option instead of '-N'.  This option is like\n'-N' except that it inserts the contents only of files that appear in\nthe second directory but not the first (that is, files that were added).",
            "subsections": []
        },
        "At the top of the patch, write instructions for the user applying the": {
            "content": "patch to remove the files that were deleted before applying the patch.\n*Note Making Patches::, for more discussion of making patches for\ndistribution.\n\nTo ignore some files while comparing directories, use the\n'--exclude=PATTERN' ('-x PATTERN') option.  This option ignores any\nfiles or subdirectories whose base names match the shell pattern\nPATTERN.  Unlike in the shell, a period at the start of the base of a\nfile name matches a wildcard at the start of a pattern.  You should\nenclose PATTERN in quotes so that the shell does not expand it.  For\nexample, the option '-x '*.[ao]'' ignores any file whose name ends with\n'.a' or '.o'.\n\nThis option accumulates if you specify it more than once.  For\nexample, using the options '-x 'RCS' -x '*,v'' ignores any file or\nsubdirectory whose base name is 'RCS' or ends with ',v'.\n\nIf you need to give this option many times, you can instead put the\npatterns in a file, one pattern per line, and use the\n'--exclude-from=FILE' ('-X FILE') option.  Trailing white space and\nempty lines are ignored in the pattern file.\n\nIf you have been comparing two directories and stopped partway\nthrough, later you might want to continue where you left off.  You can\ndo this by using the '--starting-file=FILE' ('-S FILE') option.  This\ncompares only the file FILE and all alphabetically later files in the\ntopmost directory level.\n\nIf two directories differ only in that file names are lower case in\none directory and upper case in the upper, 'diff' normally reports many\ndifferences because it compares file names in a case sensitive way.",
            "subsections": []
        },
        "With the '--ignore-file-name-case' option, 'diff' ignores case": {
            "content": "differences in file names, so that for example the contents of the file\n'Tao' in one directory are compared to the contents of the file 'TAO' in\nthe other.  The '--no-ignore-file-name-case' option cancels the effect\nof the '--ignore-file-name-case' option, reverting to the default\nbehavior.\n\nIf an '--exclude=PATTERN' ('-x PATTERN') option, or an\n'--exclude-from=FILE' ('-X FILE') option, is specified while the\n'--ignore-file-name-case' option is in effect, case is ignored when\nexcluding file names matching the specified patterns.\n\nTo tell 'diff' not to follow a symbolic link, use the\n'--no-dereference' option.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Adjusting Output,  Next: diff Performance,  Prev: Comparing Directories,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "5 Making 'diff' Output Prettier": {
            "content": "'diff' provides several ways to adjust the appearance of its output.\nThese adjustments can be applied to any output format.\n\n* Menu:\n\n* Tabs::            Preserving the alignment of tab stops.\n* Trailing Blanks:: Suppressing blanks before empty output lines.\n* Pagination::      Page numbering and time-stamping 'diff' output.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Tabs,  Next: Trailing Blanks,  Up: Adjusting Output": {
            "content": "",
            "subsections": [
                {
                    "name": "5.1 Preserving Tab Stop Alignment",
                    "content": ""
                }
            ]
        },
        "The lines of text in some of the 'diff' output formats are preceded by": {
            "content": "one or two characters that indicate whether the text is inserted,\ndeleted, or changed.  The addition of those characters can cause tabs to\nmove to the next tab stop, throwing off the alignment of columns in the\nline.  GNU 'diff' provides two ways to make tab-aligned columns line up\ncorrectly.\n\nThe first way is to have 'diff' convert all tabs into the correct\nnumber of spaces before outputting them; select this method with the\n'--expand-tabs' ('-t') option.  To use this form of output with 'patch',\nyou must give 'patch' the '-l' or '--ignore-white-space' option (*note",
            "subsections": []
        },
        "Changed White Space::, for more information).  'diff' normally assumes": {
            "content": "that tab stops are set every 8 print columns, but this can be altered by\nthe '--tabsize=COLUMNS' option.\n\nThe other method for making tabs line up correctly is to add a tab\ncharacter instead of a space after the indicator character at the\nbeginning of the line.  This ensures that all following tab characters\nare in the same position relative to tab stops that they were in the\noriginal files, so that the output is aligned correctly.  Its\ndisadvantage is that it can make long lines too long to fit on one line\nof the screen or the paper.  It also does not work with the unified\noutput format, which does not have a space character after the change\ntype indicator character.  Select this method with the '-T' or\n'--initial-tab' option.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Trailing Blanks,  Next: Pagination,  Prev: Tabs,  Up: Adjusting Output": {
            "content": "",
            "subsections": [
                {
                    "name": "5.2 Omitting trailing blanks",
                    "content": ""
                }
            ]
        },
        "When outputting lines in normal or context format, or outputting an": {
            "content": "unchanged line in unified format, 'diff' normally outputs a blank just\nbefore each line.  If the line is empty, the output of 'diff' therefore\ncontains trailing blanks even though the input does not contain them.",
            "subsections": []
        },
        "For example, when outputting an unchanged empty line in context format,": {
            "content": "'diff' normally outputs a line with two leading spaces.\n\nSome text editors and email agents routinely delete trailing blanks,\nso it can be a problem to deal with diff output files that contain them.",
            "subsections": []
        },
        "You can avoid this problem with the '--suppress-blank-empty' option.  It": {
            "content": "causes 'diff' to omit trailing blanks at the end of output lines in\nnormal, context, and unified format, unless the trailing blanks were\nalready present in the input.  This changes the output format slightly,\nso that output lines are guaranteed to never end in a blank unless an\ninput line ends in a blank.  This format is less likely to be munged by\ntext editors or by transmission via email.  It is accepted by GNU\n'patch' as well.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Pagination,  Prev: Trailing Blanks,  Up: Adjusting Output": {
            "content": "",
            "subsections": [
                {
                    "name": "5.3 Paginating 'diff' Output",
                    "content": "It can be convenient to have long output page-numbered and time-stamped."
                }
            ]
        },
        "The '--paginate' ('-l') option does this by sending the 'diff' output": {
            "content": "through the 'pr' program.  Here is what the page header might look like\nfor 'diff -lc lao tzu':\n\n2002-02-22 14:20                 diff -lc lao tzu                 Page 1\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: diff Performance,  Next: Comparing Three Files,  Prev: Adjusting Output,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "6 'diff' Performance Tradeoffs": {
            "content": "GNU 'diff' runs quite efficiently; however, in some circumstances you\ncan cause it to run faster or produce a more compact set of changes.\n\nOne way to improve 'diff' performance is to use hard or symbolic\nlinks to files instead of copies.  This improves performance because\n'diff' normally does not need to read two hard or symbolic links to the\nsame file, since their contents must be identical.  For example, suppose\nyou copy a large directory hierarchy, make a few changes to the copy,\nand then often use 'diff -r' to compare the original to the copy.  If\nthe original files are read-only, you can greatly improve performance by\ncreating the copy using hard or symbolic links (e.g., with GNU 'cp -lR'\nor 'cp -sR').  Before editing a file in the copy for the first time, you\nshould break the link and replace it with a regular copy.\n\nYou can also affect the performance of GNU 'diff' by giving it\noptions that change the way it compares files.  Performance has more\nthan one dimension.  These options improve one aspect of performance at\nthe cost of another, or they improve performance in some cases while\nhurting it in others.\n\nThe way that GNU 'diff' determines which lines have changed always\ncomes up with a near-minimal set of differences.  Usually it is good\nenough for practical purposes.  If the 'diff' output is large, you might\nwant 'diff' to use a modified algorithm that sometimes produces a\nsmaller set of differences.  The '--minimal' ('-d') option does this;\nhowever, it can also cause 'diff' to run more slowly than usual, so it\nis not the default behavior.\n\nWhen the files you are comparing are large and have small groups of\nchanges scattered throughout them, you can use the '--speed-large-files'\noption to make a different modification to the algorithm that 'diff'\nuses.  If the input files have a constant small density of changes, this\noption speeds up the comparisons without changing the output.  If not,\n'diff' might produce a larger set of differences; however, the output\nwill still be correct.\n\nNormally 'diff' discards the prefix and suffix that is common to both\nfiles before it attempts to find a minimal set of differences.  This\nmakes 'diff' run faster, but occasionally it may produce non-minimal\noutput.  The '--horizon-lines=LINES' option prevents 'diff' from\ndiscarding the last LINES lines of the prefix and the first LINES lines\nof the suffix.  This gives 'diff' further opportunities to find a\nminimal output.\n\nSuppose a run of changed lines includes a sequence of lines at one\nend and there is an identical sequence of lines just outside the other\nend.  The 'diff' command is free to choose which identical sequence is\nincluded in the hunk.  In this case, 'diff' normally shifts the hunk's\nboundaries when this merges adjacent hunks, or shifts a hunk's lines\ntowards the end of the file.  Merging hunks can make the output look\nnicer in some cases.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Comparing Three Files,  Next: diff3 Merging,  Prev: diff Performance,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "7 Comparing Three Files": {
            "content": "",
            "subsections": []
        },
        "Use the program 'diff3' to compare three files and show any differences": {
            "content": "among them.  ('diff3' can also merge files; see *note diff3 Merging::).\n\nThe \"normal\" 'diff3' output format shows each hunk of differences\nwithout surrounding context.  Hunks are labeled depending on whether\nthey are two-way or three-way, and lines are annotated by their location\nin the input files.\n\n*Note Invoking diff3::, for more information on how to run 'diff3'.\n\n* Menu:\n\n* Sample diff3 Input::    Sample 'diff3' input for examples.\n* Example diff3 Normal::  Sample output in the normal format.\n* Detailed diff3 Normal:: A detailed description of normal output format.\n* diff3 Hunks::           The format of normal output format.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Sample diff3 Input,  Next: Example diff3 Normal,  Up: Comparing Three Files": {
            "content": "",
            "subsections": [
                {
                    "name": "7.1 A Third Sample Input File",
                    "content": ""
                }
            ]
        },
        "Here is a third sample file that will be used in examples to illustrate": {
            "content": "the output of 'diff3' and how various options can change it.  The first\ntwo files are the same that we used for 'diff' (*note Sample diff\nInput::).  This is the third sample file, called 'tao':\n\nThe Way that can be told of is not the eternal Way;\nThe name that can be named is not the eternal name.\nThe Nameless is the origin of Heaven and Earth;\nThe named is the mother of all things.\n\nTherefore let there always be non-being,\nso we may see their subtlety,\nAnd let there always be being,\nso we may see their result.\nThe two are the same,\nBut after they are produced,\nthey have different names.\n\n-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Example diff3 Normal,  Next: Detailed diff3 Normal,  Prev: Sample diff3 Input,  Up: Comparing Three Files": {
            "content": "",
            "subsections": [
                {
                    "name": "7.2 An Example of 'diff3' Normal Format",
                    "content": "Here is the output of the command 'diff3 lao tzu tao' (*note Sample\ndiff3 Input::, for the complete contents of the files).  Notice that it\nshows only the lines that are different among the three files.\n\n====2\n1:1,2c\n3:1,2c\nThe Way that can be told of is not the eternal Way;\nThe name that can be named is not the eternal name.\n2:0a\n====1\n1:4c\nThe Named is the mother of all things.\n2:2,3c\n3:4,5c\nThe named is the mother of all things.\n\n====3\n1:8c\n2:7c\nso we may see their outcome.\n3:9c"
                },
                {
                    "name": "so we may see their result.",
                    "content": "1:11a\n2:11,13c\nThey both may be called deep and profound.\nDeeper and more profound,\nThe door of all subtleties!\n3:13,14c\n\n-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Detailed diff3 Normal,  Next: diff3 Hunks,  Prev: Example diff3 Normal,  Up: Comparing Three Files": {
            "content": "",
            "subsections": [
                {
                    "name": "7.3 Detailed Description of 'diff3' Normal Format",
                    "content": "Each hunk begins with a line marked '===='.  Three-way hunks have plain\n'====' lines, and two-way hunks have '1', '2', or '3' appended to\nspecify which of the three input files differ in that hunk.  The hunks\ncontain copies of two or three sets of input lines each preceded by one\nor two commands identifying where the lines came from.\n\nNormally, two spaces precede each copy of an input line to\ndistinguish it from the commands.  But with the '--initial-tab' ('-T')\noption, 'diff3' uses a tab instead of two spaces; this lines up tabs\ncorrectly.  *Note Tabs::, for more information.\n\nCommands take the following forms:\n\n'FILE:La'\nThis hunk appears after line L of file FILE, and contains no lines\nin that file.  To edit this file to yield the other files, one must\nappend hunk lines taken from the other files.  For example, '1:11a'\nmeans that the hunk follows line 11 in the first file and contains\nno lines from that file.\n\n'FILE:Rc'\nThis hunk contains the lines in the range R of file FILE.  The\nrange R is a comma-separated pair of line numbers, or just one\nnumber if there is only one line.  To edit this file to yield the\nother files, one must change the specified lines to be the lines\ntaken from the other files.  For example, '2:11,13c' means that the\nhunk contains lines 11 through 13 from the second file.\n\nIf the last line in a set of input lines is incomplete (*note"
                }
            ]
        },
        "Incomplete Lines::), it is distinguished on output from a full line by a": {
            "content": "following line that starts with '\\'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: diff3 Hunks,  Prev: Detailed diff3 Normal,  Up: Comparing Three Files": {
            "content": "",
            "subsections": [
                {
                    "name": "7.4 'diff3' Hunks",
                    "content": ""
                }
            ]
        },
        "Groups of lines that differ in two or three of the input files are": {
            "content": "called \"diff3 hunks\", by analogy with 'diff' hunks (*note Hunks::).  If\nall three input files differ in a 'diff3' hunk, the hunk is called a\n\"three-way hunk\"; if just two input files differ, it is a \"two-way\nhunk\".\n\nAs with 'diff', several solutions are possible.  When comparing the\nfiles 'A', 'B', and 'C', 'diff3' normally finds 'diff3' hunks by merging\nthe two-way hunks output by the two commands 'diff A B' and 'diff A C'.",
            "subsections": []
        },
        "This does not necessarily minimize the size of the output, but": {
            "content": "exceptions should be rare.\n\nFor example, suppose 'F' contains the three lines 'a', 'b', 'f', 'G'\ncontains the lines 'g', 'b', 'g', and 'H' contains the lines 'a', 'b',\n'h'.  'diff3 F G H' might output the following:\n\n====2\n1:1c\n3:1c\na\n2:1c",
            "subsections": [
                {
                    "name": "g",
                    "content": "1:3c\nf\n2:3c\ng\n3:3c\nh\n\nbecause it found a two-way hunk containing 'a' in the first and third\nfiles and 'g' in the second file, then the single line 'b' common to all\nthree files, then a three-way hunk containing the last line of each\nfile.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: diff3 Merging,  Next: Interactive Merging,  Prev: Comparing Three Files,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "8 Merging From a Common Ancestor": {
            "content": "",
            "subsections": []
        },
        "When two people have made changes to copies of the same file, 'diff3'": {
            "content": "can produce a merged output that contains both sets of changes together\nwith warnings about conflicts.\n\nOne might imagine programs with names like 'diff4' and 'diff5' to\ncompare more than three files simultaneously, but in practice the need\nrarely arises.  You can use 'diff3' to merge three or more sets of\nchanges to a file by merging two change sets at a time.\n\n'diff3' can incorporate changes from two modified versions into a\ncommon preceding version.  This lets you merge the sets of changes\nrepresented by the two newer files.  Specify the common ancestor version\nas the second argument and the two newer versions as the first and third\narguments, like this:\n\ndiff3 MINE OLDER YOURS\n",
            "subsections": []
        },
        "You can remember the order of the arguments by noting that they are in": {
            "content": "alphabetical order.\n\nYou can think of this as subtracting OLDER from YOURS and adding the\nresult to MINE, or as merging into MINE the changes that would turn\nOLDER into YOURS.  This merging is well-defined as long as MINE and\nOLDER match in the neighborhood of each such change.  This fails to be\ntrue when all three input files differ or when only OLDER differs; we\ncall this a \"conflict\".  When all three input files differ, we call the\nconflict an \"overlap\".\n\n'diff3' gives you several ways to handle overlaps and conflicts.  You\ncan omit overlaps or conflicts, or select only overlaps, or mark\nconflicts with special '<<<<<<<' and '>>>>>>>' lines.\n\n'diff3' can output the merge results as an 'ed' script that that can\nbe applied to the first file to yield the merged output.  However, it is\nusually better to have 'diff3' generate the merged output directly; this\nbypasses some problems with 'ed'.\n\n* Menu:\n\n* Which Changes::            Selecting changes to incorporate.\n* Marking Conflicts::        Marking conflicts.\n* Bypassing ed::             Generating merged output directly.\n* Merging Incomplete Lines:: How 'diff3' merges incomplete lines.\n* Saving the Changed File::  Emulating System V behavior.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Which Changes,  Next: Marking Conflicts,  Up: diff3 Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "8.1 Selecting Which Changes to Incorporate",
                    "content": ""
                }
            ]
        },
        "You can select all unmerged changes from OLDER to YOURS for merging into": {
            "content": "MINE with the '--ed' ('-e') option.  You can select only the\nnonoverlapping unmerged changes with '--easy-only' ('-3'), and you can\nselect only the overlapping changes with '--overlap-only' ('-x').\n\nThe '-e', '-3' and '-x' options select only \"unmerged changes\", i.e.\nchanges where MINE and YOURS differ; they ignore changes from OLDER to\nYOURS where MINE and YOURS are identical, because they assume that such\nchanges have already been merged.  If this assumption is not a safe one,\nyou can use the '--show-all' ('-A') option (*note Marking Conflicts::).\n\nHere is the output of the command 'diff3' with each of these three\noptions (*note Sample diff3 Input::, for the complete contents of the\nfiles).  Notice that '-e' outputs the union of the disjoint sets of\nchanges output by '-3' and '-x'.\n\nOutput of 'diff3 -e lao tzu tao':\n11a\n\n-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n.\n8c\nso we may see their result.\n.\n\nOutput of 'diff3 -3 lao tzu tao':\n8c\nso we may see their result.\n.\n\nOutput of 'diff3 -x lao tzu tao':\n11a\n\n-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Marking Conflicts,  Next: Bypassing ed,  Prev: Which Changes,  Up: diff3 Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "8.2 Marking Conflicts",
                    "content": "'diff3' can mark conflicts in the merged output by bracketing them with\nspecial marker lines.  A conflict that comes from two files A and B is\nmarked as follows:\n\n<<<<<<< A"
                },
                {
                    "name": "lines from A",
                    "content": "lines from B\n>>>>>>> B\n\nA conflict that comes from three files A, B and C is marked as\nfollows:\n\n<<<<<<< A\nlines from A\n||||||| B"
                },
                {
                    "name": "lines from B",
                    "content": "lines from C\n>>>>>>> C\n\nThe '--show-all' ('-A') option acts like the '-e' option, except that\nit brackets conflicts, and it outputs all changes from OLDER to YOURS,\nnot just the unmerged changes.  Thus, given the sample input files\n(*note Sample diff3 Input::), 'diff3 -A lao tzu tao' puts brackets\naround the conflict where only 'tzu' differs:\n\n<<<<<<< tzu\n=======\nThe Way that can be told of is not the eternal Way;\nThe name that can be named is not the eternal name.\n>>>>>>> tao\n\nAnd it outputs the three-way conflict as follows:\n\n<<<<<<< lao\n||||||| tzu\nThey both may be called deep and profound.\nDeeper and more profound,"
                },
                {
                    "name": "The door of all subtleties!",
                    "content": "-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n>>>>>>> tao\n\nThe '--show-overlap' ('-E') option outputs less information than the\n'--show-all' ('-A') option, because it outputs only unmerged changes,\nand it never outputs the contents of the second file.  Thus the '-E'\noption acts like the '-e' option, except that it brackets the first and\nthird files from three-way overlapping changes.  Similarly, '-X' acts\nlike '-x', except it brackets all its (necessarily overlapping) changes."
                }
            ]
        },
        "For example, for the three-way overlapping change above, the '-E' and": {
            "content": "'-X' options output the following:\n\n<<<<<<< lao\n=======\n\n-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n>>>>>>> tao\n\nIf you are comparing files that have meaningless or uninformative\nnames, you can use the '--label=LABEL' option to show alternate names in\nthe '<<<<<<<', '|||||||' and '>>>>>>>' brackets.  This option can be\ngiven up to three times, once for each input file.  Thus 'diff3 -A\n--label X --label Y --label Z A B C' acts like 'diff3 -A A B C', except\nthat the output looks like it came from files named 'X', 'Y' and 'Z'\nrather than from files named 'A', 'B' and 'C'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Bypassing ed,  Next: Merging Incomplete Lines,  Prev: Marking Conflicts,  Up: diff3 Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "8.3 Generating the Merged Output Directly",
                    "content": ""
                }
            ]
        },
        "With the '--merge' ('-m') option, 'diff3' outputs the merged file": {
            "content": "directly.  This is more efficient than using 'ed' to generate it, and\nworks even with non-text files that 'ed' would reject.  If you specify\n'-m' without an 'ed' script option, '-A' is assumed.\n\nFor example, the command 'diff3 -m lao tzu tao' (*note Sample diff3\nInput:: for a copy of the input files) would output the following:\n\n<<<<<<< tzu\n=======\nThe Way that can be told of is not the eternal Way;\nThe name that can be named is not the eternal name.\n>>>>>>> tao\nThe Nameless is the origin of Heaven and Earth;\nThe Named is the mother of all things.\nTherefore let there always be non-being,\nso we may see their subtlety,\nAnd let there always be being,\nso we may see their result.\nThe two are the same,\nBut after they are produced,\nthey have different names.\n<<<<<<< lao\n||||||| tzu\nThey both may be called deep and profound.\nDeeper and more profound,",
            "subsections": [
                {
                    "name": "The door of all subtleties!",
                    "content": "-- The Way of Lao-Tzu, tr. Wing-tsit Chan\n>>>>>>> tao\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Merging Incomplete Lines,  Next: Saving the Changed File,  Prev: Bypassing ed,  Up: diff3 Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "8.4 How 'diff3' Merges Incomplete Lines",
                    "content": "With '-m', incomplete lines (*note Incomplete Lines::) are simply copied\nto the output as they are found; if the merged output ends in an\nconflict and one of the input files ends in an incomplete line,\nsucceeding '|||||||', '=======' or '>>>>>>>' brackets appear somewhere\nother than the start of a line because they are appended to the\nincomplete line.\n\nWithout '-m', if an 'ed' script option is specified and an incomplete\nline is found, 'diff3' generates a warning and acts as if a newline had\nbeen present.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Saving the Changed File,  Prev: Merging Incomplete Lines,  Up: diff3 Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "8.5 Saving the Changed File",
                    "content": ""
                }
            ]
        },
        "Traditional Unix 'diff3' generates an 'ed' script without the trailing": {
            "content": "'w' and 'q' commands that save the changes.  System V 'diff3' generates\nthese extra commands.  GNU 'diff3' normally behaves like traditional",
            "subsections": []
        },
        "Unix 'diff3', but with the '-i' option it behaves like System V 'diff3'": {
            "content": "and appends the 'w' and 'q' commands.\n\nThe '-i' option requires one of the 'ed' script options '-AeExX3',\nand is incompatible with the merged output option '-m'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Interactive Merging,  Next: Merging with patch,  Prev: diff3 Merging,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "9 Interactive Merging with 'sdiff'": {
            "content": "",
            "subsections": []
        },
        "With 'sdiff', you can merge two files interactively based on a": {
            "content": "side-by-side '-y' format comparison (*note Side by Side::).  Use\n'--output=FILE' ('-o FILE') to specify where to put the merged text.\n*Note Invoking sdiff::, for more details on the options to 'sdiff'.\n\nAnother way to merge files interactively is to use the Emacs Lisp\npackage 'emerge'.  *Note Emerge: (emacs)Emerge, for more information.\n\n* Menu:\n\n* sdiff Option Summary:: Summary of 'sdiff' options.\n* Merge Commands::       Merging two files interactively.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: sdiff Option Summary,  Next: Merge Commands,  Up: Interactive Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "9.1 Specifying 'diff' Options to 'sdiff'",
                    "content": "The following 'sdiff' options have the same meaning as for 'diff'.\n*Note diff Options::, for the use of these options.\n\n-a -b -d -i -t -v\n-B -E -I REGEXP -Z\n"
                },
                {
                    "name": "--expand-tabs",
                    "content": "--ignore-blank-lines  --ignore-case\n--ignore-matching-lines=REGEXP  --ignore-space-change\n--ignore-tab-expansion  --ignore-trailing-space\n--left-column  --minimal  --speed-large-files\n--strip-trailing-cr  --suppress-common-lines\n--tabsize=COLUMNS  --text  --version  --width=COLUMNS\n\nFor historical reasons, 'sdiff' has alternate names for some options.",
                    "long": "--expand-tabs"
                }
            ]
        },
        "The '-l' option is equivalent to the '--left-column' option, and": {
            "content": "similarly '-s' is equivalent to '--suppress-common-lines'.  The meaning\nof the 'sdiff' '-w' and '-W' options is interchanged from that of\n'diff': with 'sdiff', '-w COLUMNS' is equivalent to '--width=COLUMNS',\nand '-W' is equivalent to '--ignore-all-space'.  'sdiff' without the\n'-o' option is equivalent to 'diff' with the '--side-by-side' ('-y')\noption (*note Side by Side::).\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Merge Commands,  Prev: sdiff Option Summary,  Up: Interactive Merging": {
            "content": "",
            "subsections": [
                {
                    "name": "9.2 Merge Commands",
                    "content": ""
                }
            ]
        },
        "Groups of common lines, with a blank gutter, are copied from the first": {
            "content": "file to the output.  After each group of differing lines, 'sdiff'\nprompts with '%' and pauses, waiting for one of the following commands.\nFollow each command with <RET>.\n\n'e'\nDiscard both versions.  Invoke a text editor on an empty temporary\nfile, then copy the resulting file to the output.\n\n'eb'\nConcatenate the two versions, edit the result in a temporary file,\nthen copy the edited result to the output.\n\n'ed'\nLike 'eb', except precede each version with a header that shows\nwhat file and lines the version came from.\n\n'el'\n'e1'\nEdit a copy of the left version, then copy the result to the\noutput.\n\n'er'\n'e2'\nEdit a copy of the right version, then copy the result to the\noutput.\n\n'l'\n'1'\nCopy the left version to the output.\n\n'q'\nQuit.\n\n'r'\n'2'\nCopy the right version to the output.\n\n's'\nSilently copy common lines.\n\n'v'\nVerbosely copy common lines.  This is the default.\n\nThe text editor invoked is specified by the 'EDITOR' environment\nvariable if it is set.  The default is system-dependent.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Merging with patch,  Next: Making Patches,  Prev: Interactive Merging,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "10 Merging with 'patch'": {
            "content": "'patch' takes comparison output produced by 'diff' and applies the\ndifferences to a copy of the original file, producing a patched version.",
            "subsections": []
        },
        "With 'patch', you can distribute just the changes to a set of files": {
            "content": "instead of distributing the entire file set; your correspondents can\napply 'patch' to update their copy of the files with your changes.\n'patch' automatically determines the diff format, skips any leading or\ntrailing headers, and uses the headers to determine which file to patch.",
            "subsections": []
        },
        "This lets your correspondents feed a mail message containing a": {
            "content": "difference listing directly to 'patch'.\n\n'patch' detects and warns about common problems like forward patches.",
            "subsections": []
        },
        "It saves any patches that it could not apply.  It can also maintain a": {
            "content": "'patchlevel.h' file to ensure that your correspondents apply diffs in\nthe proper order.\n\n'patch' accepts a series of diffs in its standard input, usually\nseparated by headers that specify which file to patch.  It applies\n'diff' hunks (*note Hunks::) one by one.  If a hunk does not exactly\nmatch the original file, 'patch' uses heuristics to try to patch the\nfile as well as it can.  If no approximate match can be found, 'patch'\nrejects the hunk and skips to the next hunk.  'patch' normally replaces\neach file F with its new version, putting reject hunks (if any) into\n'F.rej'.\n\n*Note Invoking patch::, for detailed information on the options to\n'patch'.\n\n* Menu:\n\n* patch Input::            Selecting the type of 'patch' input.\n* Revision Control::       Getting files from RCS, SCCS, etc.\n* Imperfect::              Dealing with imperfect patches.\n* Creating and Removing::  Creating and removing files with a patch.\n* Patching Timestamps::   Updating timestamps on patched files.\n* Multiple Patches::       Handling multiple patches in a file.\n* patch Directories::      Changing directory and stripping directories.\n* Backups::                Whether backup files are made.\n* Backup Names::           Backup file names.\n* Reject Names::           Reject file names.\n* patch Messages::         Messages and questions 'patch' can produce.\n* patch and POSIX::        Conformance to the POSIX standard.\n* patch and Tradition::    GNU versus traditional 'patch'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch Input,  Next: Revision Control,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.1 Selecting the 'patch' Input Format",
                    "content": "'patch' normally determines which 'diff' format the patch file uses by\nexamining its contents.  For patch files that contain particularly\nconfusing leading text, you might need to use one of the following\noptions to force 'patch' to interpret the patch file as a certain format\nof diff.  The output formats listed here are the only ones that 'patch'\ncan understand.\n\n'-c'\n'--context'\ncontext diff.\n\n'-e'\n'--ed'\n'ed' script.\n\n'-n'\n'--normal'\nnormal diff.\n\n'-u'\n'--unified'\nunified diff.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Revision Control,  Next: Imperfect,  Prev: patch Input,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.2 Revision Control",
                    "content": ""
                }
            ]
        },
        "If a nonexistent input file is under a revision control system supported": {
            "content": "by 'patch', 'patch' normally asks the user whether to get (or check out)\nthe file from the revision control system.  Patch currently supports\nRCS, ClearCase and SCCS. Under RCS and SCCS, 'patch' also asks when the\ninput file is read-only and matches the default version in the revision\ncontrol system.\n\nThe '--get=NUM' ('-g NUM') option affects access to files under\nsupported revision control systems.  If NUM is positive, 'patch' gets\nthe file without asking the user; if zero, 'patch' neither asks the user\nnor gets the file; and if negative, 'patch' asks the user before getting\nthe file.  The default value of NUM is given by the value of the\n'PATCHGET' environment variable if it is set; if not, the default value\nis zero if 'patch' is conforming to POSIX, negative otherwise.  *Note\npatch and POSIX::.\n\nThe choice of revision control system is unaffected by the\n'VERSIONCONTROL' environment variable (*note Backup Names::).\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Imperfect,  Next: Creating and Removing,  Prev: Revision Control,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.3 Applying Imperfect Patches",
                    "content": "'patch' tries to skip any leading text in the patch file, apply the\ndiff, and then skip any trailing text.  Thus you can feed a mail message\ndirectly to 'patch', and it should work.  If the entire diff is indented\nby a constant amount of white space, 'patch' automatically ignores the\nindentation.  If a context diff contains trailing carriage return on\neach line, 'patch' automatically ignores the carriage return.  If a\ncontext diff has been encapsulated by prepending '- ' to lines beginning\nwith '-' as per Internet RFC 934\n(ftp://ftp.isi.edu/in-notes/rfc934.txt), 'patch' automatically\nunencapsulates the input.\n\nHowever, certain other types of imperfect input require user\nintervention or testing.\n\n* Menu:\n\n* Changed White Space:: When tabs and spaces don't match exactly.\n* Reversed Patches::    Applying reversed patches correctly.\n* Inexact::             Helping 'patch' find close matches.\n* Dry Runs::            Predicting what 'patch' will do.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Changed White Space,  Next: Reversed Patches,  Up: Imperfect": {
            "content": "",
            "subsections": []
        },
        "Sometimes mailers, editors, or other programs change spaces into tabs,": {
            "content": "or vice versa.  If this happens to a patch file or an input file, the\nfiles might look the same, but 'patch' will not be able to match them\nproperly.  If this problem occurs, use the '-l' or\n'--ignore-white-space' option, which makes 'patch' compare blank\ncharacters (i.e. spaces and tabs) loosely so that any nonempty sequence\nof blanks in the patch file matches any nonempty sequence of blanks in\nthe input files.  Non-blank characters must still match exactly.  Each\nline of the context must still match a line in the input file.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Reversed Patches,  Next: Inexact,  Prev: Changed White Space,  Up: Imperfect": {
            "content": "Sometimes people run 'diff' with the new file first instead of second.\nThis creates a diff that is \"reversed\".  To apply such patches, give\n'patch' the '--reverse' ('-R') option.  'patch' then attempts to swap\neach hunk around before applying it.  Rejects come out in the swapped\nformat.\n\nOften 'patch' can guess that the patch is reversed.  If the first\nhunk of a patch fails, 'patch' reverses the hunk to see if it can apply\nit that way.  If it can, 'patch' asks you if you want to have the '-R'\noption set; if it can't, 'patch' continues to apply the patch normally.",
            "subsections": []
        },
        "This method cannot detect a reversed patch if it is a normal diff and": {
            "content": "the first command is an append (which should have been a delete) since\nappends always succeed, because a null context matches anywhere.  But\nmost patches add or change lines rather than delete them, so most\nreversed normal diffs begin with a delete, which fails, and 'patch'\nnotices.\n\nIf you apply a patch that you have already applied, 'patch' thinks it\nis a reversed patch and offers to un-apply the patch.  This could be\nconstrued as a feature.  If you did this inadvertently and you don't\nwant to un-apply the patch, just answer 'n' to this offer and to the\nsubsequent \"apply anyway\" question--or type 'C-c' to kill the 'patch'\nprocess.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Inexact,  Next: Dry Runs,  Prev: Reversed Patches,  Up: Imperfect": {
            "content": "",
            "subsections": []
        },
        "For context diffs, and to a lesser extent normal diffs, 'patch' can": {
            "content": "detect when the line numbers mentioned in the patch are incorrect, and\nit attempts to find the correct place to apply each hunk of the patch.",
            "subsections": []
        },
        "As a first guess, it takes the line number mentioned in the hunk, plus": {
            "content": "or minus any offset used in applying the previous hunk.  If that is not\nthe correct place, 'patch' scans both forward and backward for a set of\nlines matching the context given in the hunk.\n\nFirst 'patch' looks for a place where all lines of the context match.",
            "subsections": []
        },
        "If it cannot find such a place, and it is reading a context or unified": {
            "content": "diff, and the maximum fuzz factor is set to 1 or more, then 'patch'\nmakes another scan, ignoring the first and last line of context.  If\nthat fails, and the maximum fuzz factor is set to 2 or more, it makes\nanother scan, ignoring the first two and last two lines of context are\nignored.  It continues similarly if the maximum fuzz factor is larger.\n\nThe '--fuzz=LINES' ('-F LINES') option sets the maximum fuzz factor\nto LINES.  This option only applies to context and unified diffs; it\nignores up to LINES lines while looking for the place to install a hunk.",
            "subsections": []
        },
        "Note that a larger fuzz factor increases the odds of making a faulty": {
            "content": "patch.  The default fuzz factor is 2; there is no point to setting it to\nmore than the number of lines of context in the diff, ordinarily 3.\n\nIf 'patch' cannot find a place to install a hunk of the patch, it\nwrites the hunk out to a reject file (*note Reject Names::, for\ninformation on how reject files are named).  It writes out rejected\nhunks in context format no matter what form the input patch is in.  If\nthe input is a normal or 'ed' diff, many of the contexts are simply\nnull.  The line numbers on the hunks in the reject file may be different\nfrom those in the patch file: they show the approximate location where\n'patch' thinks the failed hunks belong in the new file rather than in\nthe old one.\n\nIf the '--verbose' option is given, then as it completes each hunk\n'patch' tells you whether the hunk succeeded or failed, and if it\nfailed, on which line (in the new file) 'patch' thinks the hunk should\ngo.  If this is different from the line number specified in the diff, it\ntells you the offset.  A single large offset may indicate that 'patch'\ninstalled a hunk in the wrong place.  'patch' also tells you if it used\na fuzz factor to make the match, in which case you should also be\nslightly suspicious.\n\n'patch' cannot tell if the line numbers are off in an 'ed' script,\nand can only detect wrong line numbers in a normal diff when it finds a\nchange or delete command.  It may have the same problem with a context\ndiff using a fuzz factor equal to or greater than the number of lines of\ncontext shown in the diff (typically 3).  In these cases, you should\nprobably look at a context diff between your original and patched input\nfiles to see if the changes make sense.  Compiling without errors is a\npretty good indication that the patch worked, but not a guarantee.\n\nA patch against an empty file applies to a nonexistent file, and vice\nversa.  *Note Creating and Removing::.\n\n'patch' usually produces the correct results, even when it must make\nmany guesses.  However, the results are guaranteed only when the patch\nis applied to an exact copy of the file that the patch was generated\nfrom.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Dry Runs,  Prev: Inexact,  Up: Imperfect": {
            "content": "",
            "subsections": []
        },
        "It may not be obvious in advance what 'patch' will do with a complicated": {
            "content": "or poorly formatted patch.  If you are concerned that the input might\ncause 'patch' to modify the wrong files, you can use the '--dry-run'\noption, which causes 'patch' to print the results of applying patches\nwithout actually changing any files.  You can then inspect the\ndiagnostics generated by the dry run to see whether 'patch' will modify\nthe files that you expect.  If the patch does not do what you want, you\ncan modify the patch (or the other options to 'patch') and try another\ndry run.  Once you are satisfied with the proposed patch you can apply\nit by invoking 'patch' as before, but this time without the '--dry-run'\noption.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Creating and Removing,  Next: Patching Timestamps,  Prev: Imperfect,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.4 Creating and Removing Files",
                    "content": ""
                }
            ]
        },
        "Sometimes when comparing two directories, a file may exist in one": {
            "content": "directory but not the other.  If you give 'diff' the '--new-file' ('-N')\noption, or if you supply an old or new file that is named '/dev/null' or\nis empty and is dated the Epoch (1970-01-01 00:00:00 UTC), 'diff'\noutputs a patch that adds or deletes the contents of this file.  When\ngiven such a patch, 'patch' normally creates a new file or removes the\nold file.  However, when conforming to POSIX (*note patch and POSIX::),\n'patch' does not remove the old file, but leaves it empty.  The\n'--remove-empty-files' ('-E') option causes 'patch' to remove output\nfiles that are empty after applying a patch, even if the patch does not\nappear to be one that removed the file.\n\nIf the patch appears to create a file that already exists, 'patch'\nasks for confirmation before applying the patch.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Patching Timestamps,  Next: Multiple Patches,  Prev: Creating and Removing,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.5 Updating Timestamps on Patched Files",
                    "content": ""
                }
            ]
        },
        "When 'patch' updates a file, it normally sets the file's last-modified": {
            "content": "timestamp to the current time of day.  If you are using 'patch' to track\na software distribution, this can cause 'make' to incorrectly conclude\nthat a patched file is out of date.  For example, if 'syntax.c' depends\non 'syntax.y', and 'patch' updates 'syntax.c' and then 'syntax.y', then\n'syntax.c' will normally appear to be out of date with respect to\n'syntax.y' even though its contents are actually up to date.\n\nThe '--set-utc' ('-Z') option causes 'patch' to set a patched file's\nmodification and access times to the timestamps given in context diff\nheaders.  If the context diff headers do not specify a time zone, they\nare assumed to use Coordinated Universal Time (UTC, often known as GMT).\n\nThe '--set-time' ('-T') option acts like '-Z' or '--set-utc', except\nthat it assumes that the context diff headers' timestamps use local time\ninstead of UTC. This option is not recommended, because patches using\nlocal time cannot easily be used by people in other time zones, and\nbecause local timestamps are ambiguous when local clocks move backwards\nduring daylight-saving time adjustments.  If the context diff headers\nspecify a time zone, this option is equivalent to '--set-utc' ('-Z').\n\n'patch' normally refrains from setting a file's timestamps if the\nfile's original last-modified timestamp does not match the time given in\nthe diff header, of if the file's contents do not exactly match the\npatch.  However, if the '--force' ('-f') option is given, the file's\ntimestamps are set regardless.\n\nDue to the limitations of the current 'diff' format, 'patch' cannot\nupdate the times of files whose contents have not changed.  Also, if you\nset file timestamps to values other than the current time of day, you\nshould also remove (e.g., with 'make clean') all files that depend on\nthe patched files, so that later invocations of 'make' do not get\nconfused by the patched files' times.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Multiple Patches,  Next: patch Directories,  Prev: Patching Timestamps,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.6 Multiple Patches in a File",
                    "content": ""
                }
            ]
        },
        "If the patch file contains more than one patch, and if you do not": {
            "content": "specify an input file on the command line, 'patch' tries to apply each\npatch as if they came from separate patch files.  This means that it\ndetermines the name of the file to patch for each patch, and that it\nexamines the leading text before each patch for file names and\nprerequisite revision level (*note Making Patches::, for more on that\ntopic).\n\n'patch' uses the following rules to intuit a file name from the\nleading text before a patch.  First, 'patch' takes an ordered list of\ncandidate file names as follows:\n\n* If the header is that of a context diff, 'patch' takes the old and\nnew file names in the header.  A name is ignored if it does not\nhave enough slashes to satisfy the '-pNUM' or '--strip=NUM' option.\nThe name '/dev/null' is also ignored.\n\n* If there is an 'Index:' line in the leading garbage and if either\nthe old and new names are both absent or if 'patch' is conforming\nto POSIX, 'patch' takes the name in the 'Index:' line.\n\n* For the purpose of the following rules, the candidate file names\nare considered to be in the order (old, new, index), regardless of\nthe order that they appear in the header.\n\nThen 'patch' selects a file name from the candidate list as follows:\n\n* If some of the named files exist, 'patch' selects the first name if\nconforming to POSIX, and the best name otherwise.\n\n* If 'patch' is not ignoring RCS, ClearCase, and SCCS (*note Revision\nControl::), and no named files exist but an RCS, ClearCase, or SCCS\nmaster is found, 'patch' selects the first named file with an RCS,\nClearCase, or SCCS master.\n\n* If no named files exist, no RCS, ClearCase, or SCCS master was\nfound, some names are given, 'patch' is not conforming to POSIX,\nand the patch appears to create a file, 'patch' selects the best\nname requiring the creation of the fewest directories.\n\n* If no file name results from the above heuristics, you are asked\nfor the name of the file to patch, and 'patch' selects that name.\n\nTo determine the \"best\" of a nonempty list of file names, 'patch'\nfirst takes all the names with the fewest path name components; of\nthose, it then takes all the names with the shortest basename; of those,\nit then takes all the shortest names; finally, it takes the first\nremaining name.\n\n*Note patch and POSIX::, to see whether 'patch' is conforming to\nPOSIX.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch Directories,  Next: Backups,  Prev: Multiple Patches,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.7 Applying Patches in Other Directories",
                    "content": "The '--directory=DIRECTORY' ('-d DIRECTORY') option to 'patch' makes\ndirectory DIRECTORY the current directory for interpreting both file\nnames in the patch file, and file names given as arguments to other\noptions (such as '-B' and '-o').  For example, while in a mail reading\nprogram, you can patch a file in the '/usr/src/emacs' directory directly\nfrom a message containing the patch like this:\n\n| patch -d /usr/src/emacs\n\nSometimes the file names given in a patch contain leading\ndirectories, but you keep your files in a directory different from the\none given in the patch.  In those cases, you can use the\n'--strip=NUMBER' ('-pNUMBER') option to set the file name strip count to\nNUMBER.  The strip count tells 'patch' how many slashes, along with the\ndirectory names between them, to strip from the front of file names.  A\nsequence of one or more adjacent slashes is counted as a single slash."
                }
            ]
        },
        "By default, 'patch' strips off all leading directories, leaving just the": {
            "content": "base file names.\n\nFor example, suppose the file name in the patch file is\n'/gnu/src/emacs/etc/NEWS'.  Using '-p0' gives the entire file name\nunmodified, '-p1' gives 'gnu/src/emacs/etc/NEWS' (no leading slash),\n'-p4' gives 'etc/NEWS', and not specifying '-p' at all gives 'NEWS'.\n\n'patch' looks for each file (after any slashes have been stripped) in\nthe current directory, or if you used the '-d DIRECTORY' option, in that\ndirectory.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Backups,  Next: Backup Names,  Prev: patch Directories,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.8 Backup Files",
                    "content": ""
                }
            ]
        },
        "Normally, 'patch' creates a backup file if the patch does not exactly": {
            "content": "match the original input file, because in that case the original data\nmight not be recovered if you undo the patch with 'patch -R' (*note",
            "subsections": []
        },
        "Reversed Patches::).  However, when conforming to POSIX, 'patch' does": {
            "content": "not create backup files by default.  *Note patch and POSIX::.\n\nThe '--backup' ('-b') option causes 'patch' to make a backup file\nregardless of whether the patch matches the original input.  The\n'--backup-if-mismatch' option causes 'patch' to create backup files for\nmismatches files; this is the default when not conforming to POSIX. The\n'--no-backup-if-mismatch' option causes 'patch' to not create backup\nfiles, even for mismatched patches; this is the default when conforming\nto POSIX.\n\nWhen backing up a file that does not exist, an empty, unreadable\nbackup file is created as a placeholder to represent the nonexistent\nfile.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Backup Names,  Next: Reject Names,  Prev: Backups,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.9 Backup File Names",
                    "content": ""
                }
            ]
        },
        "Normally, 'patch' renames an original input file into a backup file by": {
            "content": "appending to its name the extension '.orig', or '~' if using '.orig'\nwould make the backup file name too long.(1)  The '-z BACKUP-SUFFIX' or\n'--suffix=BACKUP-SUFFIX' option causes 'patch' to use BACKUP-SUFFIX as\nthe backup extension instead.\n\nAlternately, you can specify the extension for backup files with the\n'SIMPLEBACKUPSUFFIX' environment variable, which the options override.\n\n'patch' can also create numbered backup files the way GNU Emacs does.",
            "subsections": []
        },
        "With this method, instead of having a single backup of each file,": {
            "content": "'patch' makes a new backup file name each time it patches a file.  For\nexample, the backups of a file named 'sink' would be called,\nsuccessively, 'sink.~1~', 'sink.~2~', 'sink.~3~', etc.\n\nThe '-V BACKUP-STYLE' or '--version-control=BACKUP-STYLE' option\ntakes as an argument a method for creating backup file names.  You can\nalternately control the type of backups that 'patch' makes with the\n'PATCHVERSIONCONTROL' environment variable, which the '-V' option\noverrides.  If 'PATCHVERSIONCONTROL' is not set, the 'VERSIONCONTROL'\nenvironment variable is used instead.  Please note that these options\nand variables control backup file names; they do not affect the choice\nof revision control system (*note Revision Control::).\n\nThe values of these environment variables and the argument to the\n'-V' option are like the GNU Emacs 'version-control' variable (*note\n(emacs)Backup Names::, for more information on backup versions in",
            "subsections": []
        },
        "Emacs).  They also recognize synonyms that are more descriptive.  The": {
            "content": "valid values are listed below; unique abbreviations are acceptable.\n\n't'\n'numbered'\nAlways make numbered backups.\n\n'nil'\n'existing'\nMake numbered backups of files that already have them, simple\nbackups of the others.  This is the default.\n\n'never'\n'simple'\nAlways make simple backups.\n\nYou can also tell 'patch' to prepend a prefix, such as a directory\nname, to produce backup file names.  The '--prefix=PREFIX' ('-B PREFIX')\noption makes backup files by prepending PREFIX to them.  The\n'--basename-prefix=PREFIX' ('-Y PREFIX') prepends PREFIX to the last\nfile name component of backup file names instead; for example, '-Y ~'\ncauses the backup name for 'dir/file.c' to be 'dir/~file.c'.  If you use\neither of these prefix options, the suffix-based options are ignored.\n\nIf you specify the output file with the '-o' option, that file is the\none that is backed up, not the input file.\n\nOptions that affect the names of backup files do not affect whether\nbackups are made.  For example, if you specify the\n'--no-backup-if-mismatch' option, none of the options described in this\nsection have any affect, because no backups are made.\n\n---------- Footnotes ----------\n\n(1) A coding error in GNU 'patch' version 2.5.4 causes it to always\nuse '~', but this should be fixed in the next release.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Reject Names,  Next: patch Messages,  Prev: Backup Names,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.10 Reject File Names",
                    "content": ""
                }
            ]
        },
        "The names for reject files (files containing patches that 'patch' could": {
            "content": "not find a place to apply) are normally the name of the output file with\n'.rej' appended (or '#' if using '.rej' would make the backup file name\ntoo long).\n\nAlternatively, you can tell 'patch' to place all of the rejected\npatches in a single file.  The '-r REJECT-FILE' or\n'--reject-file=REJECT-FILE' option uses REJECT-FILE as the reject file\nname.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch Messages,  Next: patch and POSIX,  Prev: Reject Names,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.11 Messages and Questions from 'patch'",
                    "content": "'patch' can produce a variety of messages, especially if it has trouble\ndecoding its input.  In a few situations where it's not sure how to\nproceed, 'patch' normally prompts you for more information from the\nkeyboard.  There are options to produce more or fewer messages, to have\nit not ask for keyboard input, and to affect the way that file names are\nquoted in messages.\n\n* Menu:\n\n* More or Fewer Messages::    Controlling the verbosity of 'patch'.\n* patch and Keyboard Input::  Inhibiting keyboard input.\n* patch Quoting Style::       Quoting file names in diagnostics.\n\n'patch' exits with status 0 if all hunks are applied successfully, 1\nif some hunks cannot be applied, and 2 if there is more serious trouble."
                }
            ]
        },
        "When applying a set of patches in a loop, you should check the exit": {
            "content": "status, so you don't apply a later patch to a partially patched file.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: More or Fewer Messages,  Next: patch and Keyboard Input,  Up: patch Messages": {
            "content": "",
            "subsections": []
        },
        "You can cause 'patch' to produce more messages by using the '--verbose'": {
            "content": "option.  For example, when you give this option, the message 'Hmm...'\nindicates that 'patch' is reading text in the patch file, attempting to\ndetermine whether there is a patch in that text, and if so, what kind of\npatch it is.\n\nYou can inhibit all terminal output from 'patch', unless an error\noccurs, by using the '-s', '--quiet', or '--silent' option.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch and Keyboard Input,  Next: patch Quoting Style,  Prev: More or Fewer Messages,  Up: patch Messages": {
            "content": "",
            "subsections": []
        },
        "There are two ways you can prevent 'patch' from asking you any": {
            "content": "questions.  The '--force' ('-f') option assumes that you know what you\nare doing.  It causes 'patch' to do the following:\n\n* Skip patches that do not contain file names in their headers.\n\n* Patch files even though they have the wrong version for the\n'Prereq:' line in the patch;\n\n* Assume that patches are not reversed even if they look like they\nare.\n",
            "subsections": []
        },
        "The '--batch' ('-t') option is similar to '-f', in that it suppresses": {
            "content": "questions, but it makes somewhat different assumptions:\n\n* Skip patches that do not contain file names in their headers (the\nsame as '-f').\n\n* Skip patches for which the file has the wrong version for the\n'Prereq:' line in the patch;\n\n* Assume that patches are reversed if they look like they are.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch Quoting Style,  Prev: patch and Keyboard Input,  Up: patch Messages": {
            "content": "",
            "subsections": []
        },
        "When 'patch' outputs a file name in a diagnostic message, it can format": {
            "content": "the name in any of several ways.  This can be useful to output file\nnames unambiguously, even if they contain punctuation or special\ncharacters like newlines.  The '--quoting-style=WORD' option controls\nhow names are output.  The WORD should be one of the following:\n\n'literal'\nOutput names as-is.\n'shell'\nQuote names for the shell if they contain shell metacharacters or\nwould cause ambiguous output.\n'shell-always'\nQuote names for the shell, even if they would normally not require\nquoting.\n'c'\nQuote names as for a C language string.\n'escape'\nQuote as with 'c' except omit the surrounding double-quote\ncharacters.\n\nYou can specify the default value of the '--quoting-style' option\nwith the environment variable 'QUOTINGSTYLE'.  If that environment\nvariable is not set, the default value is 'shell', but this default may\nchange in a future version of 'patch'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch and POSIX,  Next: patch and Tradition,  Prev: patch Messages,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.12 'patch' and the POSIX Standard",
                    "content": ""
                }
            ]
        },
        "If you specify the '--posix' option, or set the 'POSIXLYCORRECT'": {
            "content": "environment variable, 'patch' conforms more strictly to the POSIX\nstandard, as follows:\n\n* Take the first existing file from the list (old, new, index) when\nintuiting file names from diff headers.  *Note Multiple Patches::.\n\n* Do not remove files that are removed by a diff.  *Note Creating and\nRemoving::.\n\n* Do not ask whether to get files from RCS, ClearCase, or SCCS. *Note\nRevision Control::.\n\n* Require that all options precede the files in the command line.\n\n* Do not backup files, even when there is a mismatch.  *Note\nBackups::.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch and Tradition,  Prev: patch and POSIX,  Up: Merging with patch": {
            "content": "",
            "subsections": [
                {
                    "name": "10.13 GNU 'patch' and Traditional 'patch'",
                    "content": "The current version of GNU 'patch' normally follows the POSIX standard.\n*Note patch and POSIX::, for the few exceptions to this general rule.\n\nUnfortunately, POSIX redefined the behavior of 'patch' in several\nimportant ways.  You should be aware of the following differences if you\nmust interoperate with traditional 'patch', or with GNU 'patch' version\n2.1 and earlier.\n\n* In traditional 'patch', the '-p' option's operand was optional, and\na bare '-p' was equivalent to '-p0'.  The '-p' option now requires\nan operand, and '-p 0' is now equivalent to '-p0'.  For maximum\ncompatibility, use options like '-p0' and '-p1'.\n\nAlso, traditional 'patch' simply counted slashes when stripping\npath prefixes; 'patch' now counts pathname components.  That is, a\nsequence of one or more adjacent slashes now counts as a single\nslash.  For maximum portability, avoid sending patches containing\n'//' in file names.\n\n* In traditional 'patch', backups were enabled by default.  This\nbehavior is now enabled with the '--backup' ('-b') option.\n\nConversely, in POSIX 'patch', backups are never made, even when\nthere is a mismatch.  In GNU 'patch', this behavior is enabled with\nthe '--no-backup-if-mismatch' option, or by conforming to POSIX.\n\nThe '-b SUFFIX' option of traditional 'patch' is equivalent to the\n'-b -z SUFFIX' options of GNU 'patch'.\n\n* Traditional 'patch' used a complicated (and incompletely\ndocumented) method to intuit the name of the file to be patched\nfrom the patch header.  This method did not conform to POSIX, and\nhad a few gotchas.  Now 'patch' uses a different, equally\ncomplicated (but better documented) method that is optionally\nPOSIX-conforming; we hope it has fewer gotchas.  The two methods\nare compatible if the file names in the context diff header and the\n'Index:' line are all identical after prefix-stripping.  Your patch\nis normally compatible if each header's file names all contain the\nsame number of slashes.\n\n* When traditional 'patch' asked the user a question, it sent the\nquestion to standard error and looked for an answer from the first\nfile in the following list that was a terminal: standard error,\nstandard output, '/dev/tty', and standard input.  Now 'patch' sends\nquestions to standard output and gets answers from '/dev/tty'.\nDefaults for some answers have been changed so that 'patch' never\ngoes into an infinite loop when using default answers.\n\n* Traditional 'patch' exited with a status value that counted the\nnumber of bad hunks, or with status 1 if there was real trouble.\nNow 'patch' exits with status 1 if some hunks failed, or with 2 if\nthere was real trouble.\n\n* Limit yourself to the following options when sending instructions\nmeant to be executed by anyone running GNU 'patch', traditional\n'patch', or a 'patch' that conforms to POSIX. Spaces are\nsignificant in the following list, and operands are required.\n\n-c\n-d DIR\n-D DEFINE\n-e\n-l\n-n\n-N\n-o OUTFILE\n-pNUM\n-R\n-r REJECTFILE\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Making Patches,  Next: Invoking cmp,  Prev: Merging with patch,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "11 Tips for Making and Using Patches": {
            "content": "",
            "subsections": []
        },
        "Use some common sense when making and using patches.  For example, when": {
            "content": "sending bug fixes to a program's maintainer, send several small patches,\none per independent subject, instead of one large, harder-to-digest\npatch that covers all the subjects.\n\nHere are some other things you should keep in mind if you are going\nto distribute patches for updating a software package.\n\n* Menu:\n\n* Tips for Patch Producers::    Advice for making patches.\n* Tips for Patch Consumers::    Advice for using patches.\n* Avoiding Common Mistakes::    Avoiding common mistakes when using 'patch'.\n* Generating Smaller Patches::  How to generate smaller patches.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Tips for Patch Producers,  Next: Tips for Patch Consumers,  Up: Making Patches": {
            "content": "",
            "subsections": [
                {
                    "name": "11.1 Tips for Patch Producers",
                    "content": ""
                }
            ]
        },
        "To create a patch that changes an older version of a package into a": {
            "content": "newer version, first make a copy of the older and newer versions in\nadjacent subdirectories.  It is common to do that by unpacking 'tar'\narchives of the two versions.\n\nTo generate the patch, use the command 'diff -Naur OLD NEW' where OLD\nand NEW identify the old and new directories.  The names OLD and NEW\nshould not contain any slashes.  The '-N' option lets the patch create\nand remove files; '-a' lets the patch update non-text files; '-u'\ngenerates useful timestamps and enough context; and '-r' lets the patch\nupdate subdirectories.  Here is an example command, using Bourne shell\nsyntax:\n\ndiff -Naur gcc-3.0.3 gcc-3.0.4\n\nTell your recipients how to apply the patches.  This should include\nwhich working directory to use, and which 'patch' options to use; the\noption '-p1' is recommended.  Test your procedure by pretending to be a\nrecipient and applying your patches to a copy of the original files.\n\n*Note Avoiding Common Mistakes::, for how to avoid common mistakes\nwhen generating a patch.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Tips for Patch Consumers,  Next: Avoiding Common Mistakes,  Prev: Tips for Patch Producers,  Up: Making Patches": {
            "content": "",
            "subsections": [
                {
                    "name": "11.2 Tips for Patch Consumers",
                    "content": "A patch producer should tell recipients how to apply the patches, so the\nfirst rule of thumb for a patch consumer is to follow the instructions\nsupplied with the patch.\n\nGNU 'diff' can analyze files with arbitrarily long lines and files\nthat end in incomplete lines.  However, older versions of 'patch' cannot\npatch such files.  If you are having trouble applying such patches, try\nupgrading to a recent version of GNU 'patch'.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Avoiding Common Mistakes,  Next: Generating Smaller Patches,  Prev: Tips for Patch Consumers,  Up: Making Patches": {
            "content": "",
            "subsections": [
                {
                    "name": "11.3 Avoiding Common Mistakes",
                    "content": ""
                }
            ]
        },
        "When producing a patch for multiple files, apply 'diff' to directories": {
            "content": "whose names do not have slashes.  This reduces confusion when the patch\nconsumer specifies the '-pNUMBER' option, since this option can have\nsurprising results when the old and new file names have different\nnumbers of slashes.  For example, do not send a patch with a header that\nlooks like this:\n\ndiff -Naur v2.0.29/prog/README prog/README\n--- v2.0.29/prog/README\t2002-03-10 23:30:39.942229878 -0800\n+++ prog/README\t2002-03-17 20:49:32.442260588 -0800\n\nbecause the two file names have different numbers of slashes, and\ndifferent versions of 'patch' interpret the file names differently.  To\navoid confusion, send output that looks like this instead:\n\ndiff -Naur v2.0.29/prog/README v2.0.30/prog/README\n--- v2.0.29/prog/README\t2002-03-10 23:30:39.942229878 -0800\n+++ v2.0.30/prog/README\t2002-03-17 20:49:32.442260588 -0800\n\nMake sure you have specified the file names correctly, either in a\ncontext diff header or with an 'Index:' line.  Take care to not send out\nreversed patches, since these make people wonder whether they have\nalready applied the patch.\n\nAvoid sending patches that compare backup file names like\n'README.orig' or 'README~', since this might confuse 'patch' into\npatching a backup file instead of the real file.  Instead, send patches\nthat compare the same base file names in different directories, e.g.\n'old/README' and 'new/README'.\n\nTo save people from partially applying a patch before other patches\nthat should have gone before it, you can make the first patch in the\npatch file update a file with a name like 'patchlevel.h' or 'version.c',\nwhich contains a patch level or version number.  If the input file\ncontains the wrong version number, 'patch' will complain immediately.\n\nAn even clearer way to prevent this problem is to put a 'Prereq:'\nline before the patch.  If the leading text in the patch file contains a\nline that starts with 'Prereq:', 'patch' takes the next word from that\nline (normally a version number) and checks whether the next input file\ncontains that word, preceded and followed by either white space or a\nnewline.  If not, 'patch' prompts you for confirmation before\nproceeding.  This makes it difficult to accidentally apply patches in\nthe wrong order.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Generating Smaller Patches,  Prev: Avoiding Common Mistakes,  Up: Making Patches": {
            "content": "",
            "subsections": [
                {
                    "name": "11.4 Generating Smaller Patches",
                    "content": "The simplest way to generate a patch is to use 'diff -Naur' (*note Tips\nfor Patch Producers::), but you might be able to reduce the size of the\npatch by renaming or removing some files before making the patch.  If\nthe older version of the package contains any files that the newer\nversion does not, or if any files have been renamed between the two\nversions, make a list of 'rm' and 'mv' commands for the user to execute\nin the old version directory before applying the patch.  Then run those\ncommands yourself in the scratch directory.\n\nIf there are any files that you don't need to include in the patch\nbecause they can easily be rebuilt from other files (for example, 'TAGS'\nand output from 'yacc' and 'makeinfo'), exclude them from the patch by\ngiving 'diff' the '-x PATTERN' option (*note Comparing Directories::)."
                }
            ]
        },
        "If you want your patch to modify a derived file because your recipients": {
            "content": "lack tools to build it, make sure that the patch for the derived file\nfollows any patches for files that it depends on, so that the\nrecipients' timestamps will not confuse 'make'.\n\nNow you can create the patch using 'diff -Naur'.  Make sure to\nspecify the scratch directory first and the newer directory second.\n\nAdd to the top of the patch a note telling the user any 'rm' and 'mv'\ncommands to run before applying the patch.  Then you can remove the\nscratch directory.\n\nYou can also shrink the patch size by using fewer lines of context,\nbut bear in mind that 'patch' typically needs at least two lines for\nproper operation when patches do not exactly match the input files.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Invoking cmp,  Next: Invoking diff,  Prev: Making Patches,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "12 Invoking 'cmp'": {
            "content": "",
            "subsections": []
        },
        "The 'cmp' command compares two files, and if they differ, tells the": {
            "content": "first byte and line number where they differ or reports that one file is\na prefix of the other.  Bytes and lines are numbered starting with 1.\nThe arguments of 'cmp' are as follows:\n\ncmp OPTIONS... FROM-FILE [TO-FILE [FROM-SKIP [TO-SKIP]]]\n\nThe file name '-' is always the standard input.  'cmp' also uses the\nstandard input if one file name is omitted.  The FROM-SKIP and TO-SKIP\noperands specify how many bytes to ignore at the start of each file;\nthey are equivalent to the '--ignore-initial=FROM-SKIP:TO-SKIP' option.\n\nBy default, 'cmp' outputs nothing if the two files have the same\ncontents.  If the two files have bytes that differ, 'cmp' reports the\nlocation of the first difference to standard output:\n\nFROM-FILE TO-FILE differ: char BYTE-NUMBER, line LINE-NUMBER\n",
            "subsections": []
        },
        "If one file is a prefix of the other, 'cmp' reports the shorter file's": {
            "content": "name to standard error, followed by a blank and extra information about\nthe shorter file:\n\ncmp: EOF on SHORTER-FILE EXTRA-INFO\n\nThe message formats can differ outside the POSIX locale.  POSIX\nallows but does not require the EOF diagnostic's file name to be\nfollowed by a blank and additional information.\n\nAn exit status of 0 means no differences were found, 1 means some\ndifferences were found, and 2 means trouble.\n\n* Menu:\n\n* cmp Options:: Summary of options to 'cmp'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: cmp Options,  Up: Invoking cmp": {
            "content": "",
            "subsections": [
                {
                    "name": "12.1 Options to 'cmp'",
                    "content": ""
                }
            ]
        },
        "Below is a summary of all of the options that GNU 'cmp' accepts.  Most": {
            "content": "options have two equivalent names, one of which is a single letter\npreceded by '-', and the other of which is a long name preceded by '--'.",
            "subsections": []
        },
        "Multiple single letter options (unless they take an argument) can be": {
            "content": "combined into a single command line argument.  Long named options can be\nabbreviated to any unique prefix of their name.\n\n'-a'\n'--text'\nTreat all files as text and compare them line-by-line, even if they\ndo not appear to be text.  *Note Binary::.\n\n'-b'\n'--ignore-space-change'\nIgnore changes in amount of white space.  *Note White Space::.\n\n'-B'\n'--ignore-blank-lines'\nIgnore changes that just insert or delete blank lines.  *Note Blank\nLines::.\n\n'-d'\n'--minimal'\nChange the algorithm to perhaps find a smaller set of changes.\nThis makes 'sdiff' slower (sometimes much slower).  *Note diff\nPerformance::.\n\n'--diff-program=PROGRAM'\nUse the compatible comparison program PROGRAM to compare files\ninstead of 'diff'.\n\n'-E'\n'--ignore-tab-expansion'\nIgnore changes due to tab expansion.  *Note White Space::.\n\n'--help'\nOutput a summary of usage and then exit.\n\n'-i'\n'--ignore-case'\nIgnore changes in case; consider upper- and lower-case to be the\nsame.  *Note Case Folding::.\n\n'-I REGEXP'\n'--ignore-matching-lines=REGEXP'\nIgnore changes that just insert or delete lines that match REGEXP.\n*Note Specified Lines::.\n\n'-l'\n'--left-column'\nPrint only the left column of two common lines.  *Note Side by Side\nFormat::.\n\n'-o FILE'\n'--output=FILE'\nPut merged output into FILE.  This option is required for merging.\n\n'-s'\n'--suppress-common-lines'\nDo not print common lines.  *Note Side by Side Format::.\n\n'--speed-large-files'\nUse heuristics to speed handling of large files that have numerous\nscattered small changes.  *Note diff Performance::.\n\n'--strip-trailing-cr'\nStrip any trailing carriage return at the end of an input line.\n*Note Binary::.\n\n'-t'\n'--expand-tabs'\nExpand tabs to spaces in the output, to preserve the alignment of\ntabs in the input files.  *Note Tabs::.\n\n'--tabsize=COLUMNS'\nAssume that tab stops are set every COLUMNS (default 8) print\ncolumns.  *Note Tabs::.\n\n'-v'\n'--version'\nOutput version information and then exit.\n\n'-w COLUMNS'\n'--width=COLUMNS'\nOutput at most COLUMNS (default 130) print columns per line.  *Note\nSide by Side Format::.  Note that for historical reasons, this\noption is '-W' in 'diff', '-w' in 'sdiff'.\n\n'-W'\n'--ignore-all-space'\nIgnore white space when comparing lines.  *Note White Space::.\nNote that for historical reasons, this option is '-w' in 'diff',\n'-W' in 'sdiff'.\n\n'-Z'\n'--ignore-trailing-space'\nIgnore white space at line end.  *Note White Space::.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Invoking diff,  Next: Invoking diff3,  Prev: Invoking cmp,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "13 Invoking 'diff'": {
            "content": "The format for running the 'diff' command is:\n\ndiff OPTIONS... FILES...\n\nIn the simplest case, two file names FROM-FILE and TO-FILE are given,\nand 'diff' compares the contents of FROM-FILE and TO-FILE.  A file name\nof '-' stands for the standard input.\n\nIf one file is a directory and the other is not, 'diff' compares the\nfile in the directory whose name is that of the non-directory.  The\nnon-directory file must not be '-'.\n\nIf two file names are given and both are directories, 'diff' compares\ncorresponding files in both directories, in alphabetical order; this\ncomparison is not recursive unless the '--recursive' ('-r') option is\ngiven.  'diff' never compares the actual contents of a directory as if\nit were a file.  The file that is fully specified may not be standard\ninput, because standard input is nameless and the notion of \"file with\nthe same name\" does not apply.\n\nIf the '--from-file=FILE' option is given, the number of file names\nis arbitrary, and FILE is compared to each named file.  Similarly, if\nthe '--to-file=FILE' option is given, each named file is compared to\nFILE.\n\n'diff' options begin with '-', so normally file names may not begin\nwith '-'.  However, '--' as an argument by itself treats the remaining\narguments as file names even if they begin with '-'.\n\nAn exit status of 0 means no differences were found, 1 means some\ndifferences were found, and 2 means trouble.\n\n* Menu:\n\n* diff Options:: Summary of options to 'diff'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: diff Options,  Up: Invoking diff": {
            "content": "",
            "subsections": [
                {
                    "name": "13.1 Options to 'diff'",
                    "content": ""
                }
            ]
        },
        "Below is a summary of all of the options that GNU 'diff' accepts.  Most": {
            "content": "options have two equivalent names, one of which is a single letter\npreceded by '-', and the other of which is a long name preceded by '--'.",
            "subsections": []
        },
        "File: diffutils.info,  Node: Invoking diff3,  Next: Invoking patch,  Prev: Invoking diff,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "14 Invoking 'diff3'": {
            "content": "",
            "subsections": []
        },
        "The 'diff3' command compares three files and outputs descriptions of": {
            "content": "their differences.  Its arguments are as follows:\n\ndiff3 OPTIONS... MINE OLDER YOURS\n\nThe files to compare are MINE, OLDER, and YOURS.  At most one of\nthese three file names may be '-', which tells 'diff3' to read the\nstandard input for that file.\n\nAn exit status of 0 means 'diff3' was successful, 1 means some\nconflicts were found, and 2 means trouble.\n\n* Menu:\n\n* diff3 Options:: Summary of options to 'diff3'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: diff3 Options,  Up: Invoking diff3": {
            "content": "",
            "subsections": [
                {
                    "name": "14.1 Options to 'diff3'",
                    "content": "Below is a summary of all of the options that GNU 'diff3' accepts."
                }
            ]
        },
        "File: diffutils.info,  Node: Invoking patch,  Next: Invoking sdiff,  Prev: Invoking diff3,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "15 Invoking 'patch'": {
            "content": "Normally 'patch' is invoked like this:\n\npatch <PATCHFILE\n\nThe full format for invoking 'patch' is:\n\npatch OPTIONS... [ORIGFILE [PATCHFILE]]\n\nYou can also specify where to read the patch from with the '-i\nPATCHFILE' or '--input=PATCHFILE' option.  If you do not specify\nPATCHFILE, or if PATCHFILE is '-', 'patch' reads the patch (that is, the\n'diff' output) from the standard input.\n\nIf you do not specify an input file on the command line, 'patch'\ntries to intuit from the \"leading text\" (any text in the patch that\ncomes before the 'diff' output) which file to edit.  *Note Multiple\nPatches::.\n\nBy default, 'patch' replaces the original input file with the patched\nversion, possibly after renaming the original file into a backup file\n(*note Backup Names::, for a description of how 'patch' names backup\nfiles).  You can also specify where to put the output with the '-o FILE'\nor '--output=FILE' option; however, do not use this option if FILE is\none of the input files.\n\n* Menu:\n\n* patch Options::     Summary table of options to 'patch'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: patch Options,  Up: Invoking patch": {
            "content": "",
            "subsections": [
                {
                    "name": "15.1 Options to 'patch'",
                    "content": "Here is a summary of all of the options that GNU 'patch' accepts.  *Note\npatch and Tradition::, for which of these options are safe to use in\nolder versions of 'patch'.\n\nMultiple single-letter options that do not take an argument can be\ncombined into a single command line argument with only one dash.\n\n'-b'\n'--backup'\nBack up the original contents of each file, even if backups would\nnormally not be made.  *Note Backups::.\n\n'-B PREFIX'\n'--prefix=PREFIX'\nPrepend PREFIX to backup file names.  *Note Backup Names::.\n\n'--backup-if-mismatch'\nBack up the original contents of each file if the patch does not\nexactly match the file.  This is the default behavior when not\nconforming to POSIX. *Note Backups::.\n\n'--binary'\nRead and write all files in binary mode, except for standard output\nand '/dev/tty'.  This option has no effect on POSIX-conforming\nsystems like GNU/Linux.  On systems where this option makes a\ndifference, the patch should be generated by 'diff -a --binary'.\n*Note Binary::.\n\n'-c'\n'--context'\nInterpret the patch file as a context diff.  *Note patch Input::.\n\n'-d DIRECTORY'\n'--directory=DIRECTORY'\nMake directory DIRECTORY the current directory for interpreting\nboth file names in the patch file, and file names given as\narguments to other options.  *Note patch Directories::.\n\n'-D NAME'\n'--ifdef=NAME'\nMake merged if-then-else output using NAME.  *Note If-then-else::.\n\n'--dry-run'\nPrint the results of applying the patches without actually changing\nany files.  *Note Dry Runs::.\n\n'-e'\n'--ed'\nInterpret the patch file as an 'ed' script.  *Note patch Input::.\n\n'-E'\n'--remove-empty-files'\nRemove output files that are empty after the patches have been\napplied.  *Note Creating and Removing::.\n\n'-f'\n'--force'\nAssume that the user knows exactly what he or she is doing, and do\nnot ask any questions.  *Note patch Messages::.\n\n'-F LINES'\n'--fuzz=LINES'\nSet the maximum fuzz factor to LINES.  *Note Inexact::.\n\n'-g NUM'\n'--get=NUM'\nIf NUM is positive, get input files from a revision control system\nas necessary; if zero, do not get the files; if negative, ask the\nuser whether to get the files.  *Note Revision Control::.\n\n'--help'\nOutput a summary of usage and then exit.\n\n'-i PATCHFILE'\n'--input=PATCHFILE'\nRead the patch from PATCHFILE rather than from standard input.\n*Note patch Options::.\n\n'-l'\n'--ignore-white-space'\nLet any sequence of blanks (spaces or tabs) in the patch file match\nany sequence of blanks in the input file.  *Note Changed White\nSpace::.\n\n'-n'\n'--normal'\nInterpret the patch file as a normal diff.  *Note patch Input::.\n\n'-N'\n'--forward'\nIgnore patches that 'patch' thinks are reversed or already applied.\nSee also '-R'.  *Note Reversed Patches::.\n\n'--no-backup-if-mismatch'\nDo not back up the original contents of files.  This is the default\nbehavior when conforming to POSIX. *Note Backups::.\n\n'-o FILE'\n'--output=FILE'\nUse FILE as the output file name.  *Note patch Options::.\n\n'-pNUMBER'\n'--strip=NUMBER'\nSet the file name strip count to NUMBER.  *Note patch\nDirectories::.\n\n'--posix'\nConform to POSIX, as if the 'POSIXLYCORRECT' environment variable\nhad been set.  *Note patch and POSIX::.\n\n'--quoting-style=WORD'\nUse style WORD to quote names in diagnostics, as if the\n'QUOTINGSTYLE' environment variable had been set to WORD.  *Note\npatch Quoting Style::.\n\n'-r REJECT-FILE'\n'--reject-file=REJECT-FILE'\nUse REJECT-FILE as the reject file name.  *Note Reject Names::.\n\n'-R'\n'--reverse'\nAssume that this patch was created with the old and new files\nswapped.  *Note Reversed Patches::.\n\n'-s'\n'--quiet'\n'--silent'\nWork silently unless an error occurs.  *Note patch Messages::.\n\n'-t'\n'--batch'\nDo not ask any questions.  *Note patch Messages::.\n\n'-T'\n'--set-time'\nSet the modification and access times of patched files from\ntimestamps given in context diff headers, assuming that the context\ndiff headers use local time.  *Note Patching Timestamps::.\n\n'-u'\n'--unified'\nInterpret the patch file as a unified diff.  *Note patch Input::.\n\n'-v'\n'--version'\nOutput version information and then exit.\n\n'-V BACKUP-STYLE'\n'--version=control=BACKUP-STYLE'\nSelect the naming convention for backup file names.  *Note Backup\nNames::.\n\n'--verbose'\nPrint more diagnostics than usual.  *Note patch Messages::.\n\n'-x NUMBER'\n'--debug=NUMBER'\nSet internal debugging flags.  Of interest only to 'patch'\npatchers.\n\n'-Y PREFIX'\n'--basename-prefix=PREFIX'\nPrepend PREFIX to base names of backup files.  *Note Backup\nNames::.\n\n'-z SUFFIX'\n'--suffix=SUFFIX'\nUse SUFFIX as the backup extension instead of '.orig' or '~'.\n*Note Backup Names::.\n\n'-Z'\n'--set-utc'\nSet the modification and access times of patched files from\ntimestamps given in context diff headers, assuming that the context\ndiff headers use UTC. *Note Patching Timestamps::.\n"
                }
            ]
        },
        "File: diffutils.info,  Node: Invoking sdiff,  Next: Standards conformance,  Prev: Invoking patch,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "16 Invoking 'sdiff'": {
            "content": "",
            "subsections": []
        },
        "The 'sdiff' command merges two files and interactively outputs the": {
            "content": "results.  Its arguments are as follows:\n\nsdiff -o OUTFILE OPTIONS... FROM-FILE TO-FILE\n\nThis merges FROM-FILE with TO-FILE, with output to OUTFILE.  If\nFROM-FILE is a directory and TO-FILE is not, 'sdiff' compares the file\nin FROM-FILE whose file name is that of TO-FILE, and vice versa.\nFROM-FILE and TO-FILE may not both be directories.\n\n'sdiff' options begin with '-', so normally FROM-FILE and TO-FILE may\nnot begin with '-'.  However, '--' as an argument by itself treats the\nremaining arguments as file names even if they begin with '-'.  You may\nnot use '-' as an input file.\n\n'sdiff' without '--output' ('-o') produces a side-by-side difference.",
            "subsections": []
        },
        "This usage is obsolete; use the '--side-by-side' ('-y') option of 'diff'": {
            "content": "instead.\n\nAn exit status of 0 means no differences were found, 1 means some\ndifferences were found, and 2 means trouble.\n\n* Menu:\n\n* sdiff Options:: Summary of options to 'diff'.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: sdiff Options,  Up: Invoking sdiff": {
            "content": "",
            "subsections": [
                {
                    "name": "16.1 Options to 'sdiff'",
                    "content": ""
                }
            ]
        },
        "Below is a summary of all of the options that GNU 'sdiff' accepts.  Each": {
            "content": "option has two equivalent names, one of which is a single letter\npreceded by '-', and the other of which is a long name preceded by '--'.",
            "subsections": []
        },
        "File: diffutils.info,  Node: Standards conformance,  Next: Projects,  Prev: Invoking sdiff,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "17 Standards conformance": {
            "content": "",
            "subsections": []
        },
        "In a few cases, the GNU utilities' default behavior is incompatible with": {
            "content": "the POSIX standard.  To suppress these incompatibilities, define the\n'POSIXLYCORRECT' environment variable.  Unless you are checking for\nPOSIX conformance, you probably do not need to define 'POSIXLYCORRECT'.\n\nNormally options and operands can appear in any order, and programs\nact as if all the options appear before any operands.  For example,\n'diff lao tzu -C 2' acts like 'diff -C 2 lao tzu', since '2' is an\noption-argument of '-C'.  However, if the 'POSIXLYCORRECT' environment\nvariable is set, options must appear before operands, unless otherwise\nspecified for a particular command.\n\nNewer versions of POSIX are occasionally incompatible with older\nversions.  For example, older versions of POSIX allowed the command\n'diff -c -10' to have the same meaning as 'diff -C 10', but POSIX\n1003.1-2001 'diff' no longer allows digit-string options like '-10'.\n\nThe GNU utilities normally conform to the version of POSIX that is\nstandard for your system.  To cause them to conform to a different\nversion of POSIX, define the 'POSIX2VERSION' environment variable to a\nvalue of the form YYYYMM specifying the year and month the standard was\nadopted.  Two values are currently supported for 'POSIX2VERSION':\n'199209' stands for POSIX 1003.2-1992, and '200112' stands for POSIX\n1003.1-2001.  For example, if you are running older software that\nassumes an older version of POSIX and uses 'diff -c -10', you can work\naround the compatibility problems by setting 'POSIX2VERSION=199209' in\nyour environment.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Projects,  Next: Copying This Manual,  Prev: Standards conformance,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "18 Future Projects": {
            "content": "",
            "subsections": []
        },
        "Here are some ideas for improving GNU 'diff' and 'patch'.  The GNU": {
            "content": "project has identified some improvements as potential programming\nprojects for volunteers.  You can also help by reporting any bugs that\nyou find.\n\nIf you are a programmer and would like to contribute something to the\nGNU project, please consider volunteering for one of these projects.  If\nyou are seriously contemplating work, please write to <gvc@gnu.org> to\ncoordinate with other volunteers.\n\n* Menu:\n\n* Shortcomings:: Suggested projects for improvements.\n* Bugs::         Reporting bugs.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Shortcomings,  Next: Bugs,  Up: Projects": {
            "content": "",
            "subsections": [
                {
                    "name": "18.1 Suggested Projects for Improving GNU 'diff' and 'patch'",
                    "content": ""
                }
            ]
        },
        "One should be able to use GNU 'diff' to generate a patch from any pair": {
            "content": "of directory trees, and given the patch and a copy of one such tree, use\n'patch' to generate a faithful copy of the other.  Unfortunately, some\nchanges to directory trees cannot be expressed using current patch\nformats; also, 'patch' does not handle some of the existing formats.\nThese shortcomings motivate the following suggested projects.\n\n* Menu:\n\n* Internationalization:: Handling multibyte and varying-width characters.\n* Changing Structure::   Handling changes to the directory structure.\n* Special Files::        Handling symbolic links, device special files, etc.\n* Unusual File Names::   Handling file names that contain unusual characters.\n* Timestamp Order::     Outputting diffs in timestamp order.\n* Ignoring Changes::     Ignoring certain changes while showing others.\n* Speedups::             Improving performance.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Internationalization,  Next: Changing Structure,  Up: Shortcomings": {
            "content": "'diff', 'diff3' and 'sdiff' treat each line of input as a string of\nunibyte characters.  This can mishandle multibyte characters in some\ncases.  For example, when asked to ignore spaces, 'diff' does not\nproperly ignore a multibyte space character.\n\nAlso, 'diff' currently assumes that each byte is one column wide, and\nthis assumption is incorrect in some locales, e.g., locales that use\nUTF-8 encoding.  This causes problems with the '-y' or '--side-by-side'\noption of 'diff'.\n\nThese problems need to be fixed without unduly affecting the\nperformance of the utilities in unibyte environments.\n\nThe IBM GNU/Linux Technology Center Internationalization Team has\nproposed patches to support internationalized 'diff'\n(http://oss.software.ibm.com/developer/opensource/linux/patches/i18n/diffutils-2.7.2-i18n-0.1.patch.gz).",
            "subsections": []
        },
        "Unfortunately, these patches are incomplete and are to an older version": {
            "content": "of 'diff', so more work needs to be done in this area.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Changing Structure,  Next: Special Files,  Prev: Internationalization,  Up: Shortcomings": {
            "content": "'diff' and 'patch' do not handle some changes to directory structure.",
            "subsections": []
        },
        "For example, suppose one directory tree contains a directory named 'D'": {
            "content": "with some subsidiary files, and another contains a file with the same\nname 'D'.  'diff -r' does not output enough information for 'patch' to\ntransform the directory subtree into the file.\n\nThere should be a way to specify that a file has been removed without\nhaving to include its entire contents in the patch file.  There should\nalso be a way to tell 'patch' that a file was renamed, even if there is\nno way for 'diff' to generate such information.  There should be a way\nto tell 'patch' that a file's timestamp has changed, even if its\ncontents have not changed.\n\nThese problems can be fixed by extending the 'diff' output format to\nrepresent changes in directory structure, and extending 'patch' to\nunderstand these extensions.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Special Files,  Next: Unusual File Names,  Prev: Changing Structure,  Up: Shortcomings": {
            "content": "",
            "subsections": []
        },
        "Some files are neither directories nor regular files: they are unusual": {
            "content": "files like symbolic links, device special files, named pipes, and\nsockets.  Currently, 'diff' treats symbolic links as if they were the\npointed-to files, except that a recursive 'diff' reports an error if it\ndetects infinite loops of symbolic links (e.g., symbolic links to '..').\n'diff' treats other special files like regular files if they are\nspecified at the top level, but simply reports their presence when\ncomparing directories.  This means that 'patch' cannot represent changes\nto such files.  For example, if you change which file a symbolic link\npoints to, 'diff' outputs the difference between the two files, instead\nof the change to the symbolic link.\n\n'diff' should optionally report changes to special files specially,\nand 'patch' should be extended to understand these extensions.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Unusual File Names,  Next: Timestamp Order,  Prev: Special Files,  Up: Shortcomings": {
            "content": "",
            "subsections": []
        },
        "When a file name contains an unusual character like a newline or white": {
            "content": "space, 'diff -r' generates a patch that 'patch' cannot parse.  The\nproblem is with format of 'diff' output, not just with 'patch', because\nwith odd enough file names one can cause 'diff' to generate a patch that\nis syntactically correct but patches the wrong files.  The format of\n'diff' output should be extended to handle all possible file names.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Timestamp Order,  Next: Ignoring Changes,  Prev: Unusual File Names,  Up: Shortcomings": {
            "content": "",
            "subsections": []
        },
        "Applying 'patch' to a multiple-file diff can result in files whose": {
            "content": "timestamps are out of order.  GNU 'patch' has options to restore the\ntimestamps of the updated files (*note Patching Timestamps::), but\nsometimes it is useful to generate a patch that works even if the\nrecipient does not have GNU patch, or does not use these options.  One\nway to do this would be to implement a 'diff' option to output diffs in\ntimestamp order.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Ignoring Changes,  Next: Speedups,  Prev: Timestamp Order,  Up: Shortcomings": {
            "content": "",
            "subsections": []
        },
        "It would be nice to have a feature for specifying two strings, one in": {
            "content": "FROM-FILE and one in TO-FILE, which should be considered to match.",
            "subsections": []
        },
        "Thus, if the two strings are 'foo' and 'bar', then if two lines differ": {
            "content": "only in that 'foo' in file 1 corresponds to 'bar' in file 2, the lines\nare treated as identical.\n\nIt is not clear how general this feature can or should be, or what\nsyntax should be used for it.\n\nA partial substitute is to filter one or both files before comparing,\ne.g.:\n\nsed 's/foo/bar/g' file1 | diff - file2\n\nHowever, this outputs the filtered text, not the original.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Speedups,  Prev: Ignoring Changes,  Up: Shortcomings": {
            "content": "",
            "subsections": []
        },
        "When comparing two large directory structures, one of which was": {
            "content": "originally copied from the other with timestamps preserved (e.g., with\n'cp -pR'), it would greatly improve performance if an option told 'diff'\nto assume that two files with the same size and timestamps have the same\ncontent.  *Note diff Performance::.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Bugs,  Prev: Shortcomings,  Up: Projects": {
            "content": "",
            "subsections": [
                {
                    "name": "18.2 Reporting Bugs",
                    "content": ""
                }
            ]
        },
        "If you think you have found a bug in GNU 'cmp', 'diff', 'diff3', or": {
            "content": "'sdiff', please report it by electronic mail to the GNU utilities bug\nreport mailing list (http://mail.gnu.org/mailman/listinfo/bug-diffutils)\n<bug-diffutils@gnu.org>.  Please send bug reports for GNU 'patch' to\n<bug-patch@gnu.org>.  Send as precise a description of the problem as\nyou can, including the output of the '--version' option and sample input\nfiles that produce the bug, if applicable.  If you have a nontrivial fix\nfor the bug, please send it as well.  If you have a patch, please send\nit too.  It may simplify the maintainer's job if the patch is relative\nto a recent test release, which you can find in the directory\n<ftp://alpha.gnu.org/gnu/diffutils/>.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Copying This Manual,  Next: Translations,  Prev: Projects,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "Appendix A Copying This Manual": {
            "content": "Version 1.3, 3 November 2008\n\nCopyright (C) 2000-2002, 2007-2008, 2022-2023 Free Software\nFoundation, Inc.\n<https://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies\nof this license document, but changing it is not allowed.\n\n0. PREAMBLE\n\nThe purpose of this License is to make a manual, textbook, or other\nfunctional and useful document \"free\" in the sense of freedom: to\nassure everyone the effective freedom to copy and redistribute it,\nwith or without modifying it, either commercially or\nnoncommercially.  Secondarily, this License preserves for the\nauthor and publisher a way to get credit for their work, while not\nbeing considered responsible for modifications made by others.\n\nThis License is a kind of \"copyleft\", which means that derivative\nworks of the document must themselves be free in the same sense.\nIt complements the GNU General Public License, which is a copyleft\nlicense designed for free software.\n\nWe have designed this License in order to use it for manuals for\nfree software, because free software needs free documentation: a\nfree program should come with manuals providing the same freedoms\nthat the software does.  But this License is not limited to\nsoftware manuals; it can be used for any textual work, regardless\nof subject matter or whether it is published as a printed book.  We\nrecommend this License principally for works whose purpose is\ninstruction or reference.\n\n1. APPLICABILITY AND DEFINITIONS\n\nThis License applies to any manual or other work, in any medium,\nthat contains a notice placed by the copyright holder saying it can\nbe distributed under the terms of this License.  Such a notice\ngrants a world-wide, royalty-free license, unlimited in duration,\nto use that work under the conditions stated herein.  The\n\"Document\", below, refers to any such manual or work.  Any member\nof the public is a licensee, and is addressed as \"you\".  You accept\nthe license if you copy, modify or distribute the work in a way\nrequiring permission under copyright law.\n\nA \"Modified Version\" of the Document means any work containing the\nDocument or a portion of it, either copied verbatim, or with\nmodifications and/or translated into another language.\n\nA \"Secondary Section\" is a named appendix or a front-matter section\nof the Document that deals exclusively with the relationship of the\npublishers or authors of the Document to the Document's overall\nsubject (or to related matters) and contains nothing that could\nfall directly within that overall subject.  (Thus, if the Document\nis in part a textbook of mathematics, a Secondary Section may not\nexplain any mathematics.)  The relationship could be a matter of\nhistorical connection with the subject or with related matters, or\nof legal, commercial, philosophical, ethical or political position\nregarding them.\n\nThe \"Invariant Sections\" are certain Secondary Sections whose\ntitles are designated, as being those of Invariant Sections, in the\nnotice that says that the Document is released under this License.\nIf a section does not fit the above definition of Secondary then it\nis not allowed to be designated as Invariant.  The Document may\ncontain zero Invariant Sections.  If the Document does not identify\nany Invariant Sections then there are none.\n\nThe \"Cover Texts\" are certain short passages of text that are\nlisted, as Front-Cover Texts or Back-Cover Texts, in the notice\nthat says that the Document is released under this License.  A\nFront-Cover Text may be at most 5 words, and a Back-Cover Text may\nbe at most 25 words.\n\nA \"Transparent\" copy of the Document means a machine-readable copy,\nrepresented in a format whose specification is available to the\ngeneral public, that is suitable for revising the document\nstraightforwardly with generic text editors or (for images composed\nof pixels) generic paint programs or (for drawings) some widely\navailable drawing editor, and that is suitable for input to text\nformatters or for automatic translation to a variety of formats\nsuitable for input to text formatters.  A copy made in an otherwise\nTransparent file format whose markup, or absence of markup, has\nbeen arranged to thwart or discourage subsequent modification by\nreaders is not Transparent.  An image format is not Transparent if\nused for any substantial amount of text.  A copy that is not\n\"Transparent\" is called \"Opaque\".\n\nExamples of suitable formats for Transparent copies include plain\nASCII without markup, Texinfo input format, LaTeX input format,\nSGML or XML using a publicly available DTD, and standard-conforming\nsimple HTML, PostScript or PDF designed for human modification.\nExamples of transparent image formats include PNG, XCF and JPG.\nOpaque formats include proprietary formats that can be read and\nedited only by proprietary word processors, SGML or XML for which\nthe DTD and/or processing tools are not generally available, and\nthe machine-generated HTML, PostScript or PDF produced by some word\nprocessors for output purposes only.\n\nThe \"Title Page\" means, for a printed book, the title page itself,\nplus such following pages as are needed to hold, legibly, the\nmaterial this License requires to appear in the title page.  For\nworks in formats which do not have any title page as such, \"Title\nPage\" means the text near the most prominent appearance of the\nwork's title, preceding the beginning of the body of the text.\n\nThe \"publisher\" means any person or entity that distributes copies\nof the Document to the public.\n\nA section \"Entitled XYZ\" means a named subunit of the Document\nwhose title either is precisely XYZ or contains XYZ in parentheses\nfollowing text that translates XYZ in another language.  (Here XYZ\nstands for a specific section name mentioned below, such as\n\"Acknowledgements\", \"Dedications\", \"Endorsements\", or \"History\".)\nTo \"Preserve the Title\" of such a section when you modify the\nDocument means that it remains a section \"Entitled XYZ\" according\nto this definition.\n\nThe Document may include Warranty Disclaimers next to the notice\nwhich states that this License applies to the Document.  These\nWarranty Disclaimers are considered to be included by reference in\nthis License, but only as regards disclaiming warranties: any other\nimplication that these Warranty Disclaimers may have is void and\nhas no effect on the meaning of this License.\n\n2. VERBATIM COPYING\n\nYou may copy and distribute the Document in any medium, either\ncommercially or noncommercially, provided that this License, the\ncopyright notices, and the license notice saying this License\napplies to the Document are reproduced in all copies, and that you\nadd no other conditions whatsoever to those of this License.  You\nmay not use technical measures to obstruct or control the reading\nor further copying of the copies you make or distribute.  However,\nyou may accept compensation in exchange for copies.  If you\ndistribute a large enough number of copies you must also follow the\nconditions in section 3.\n\nYou may also lend copies, under the same conditions stated above,\nand you may publicly display copies.\n\n3. COPYING IN QUANTITY\n\nIf you publish printed copies (or copies in media that commonly\nhave printed covers) of the Document, numbering more than 100, and\nthe Document's license notice requires Cover Texts, you must\nenclose the copies in covers that carry, clearly and legibly, all\nthese Cover Texts: Front-Cover Texts on the front cover, and\nBack-Cover Texts on the back cover.  Both covers must also clearly\nand legibly identify you as the publisher of these copies.  The\nfront cover must present the full title with all words of the title\nequally prominent and visible.  You may add other material on the\ncovers in addition.  Copying with changes limited to the covers, as\nlong as they preserve the title of the Document and satisfy these\nconditions, can be treated as verbatim copying in other respects.\n\nIf the required texts for either cover are too voluminous to fit\nlegibly, you should put the first ones listed (as many as fit\nreasonably) on the actual cover, and continue the rest onto\nadjacent pages.\n\nIf you publish or distribute Opaque copies of the Document\nnumbering more than 100, you must either include a machine-readable\nTransparent copy along with each Opaque copy, or state in or with\neach Opaque copy a computer-network location from which the general\nnetwork-using public has access to download using public-standard\nnetwork protocols a complete Transparent copy of the Document, free\nof added material.  If you use the latter option, you must take\nreasonably prudent steps, when you begin distribution of Opaque\ncopies in quantity, to ensure that this Transparent copy will\nremain thus accessible at the stated location until at least one\nyear after the last time you distribute an Opaque copy (directly or\nthrough your agents or retailers) of that edition to the public.\n\nIt is requested, but not required, that you contact the authors of\nthe Document well before redistributing any large number of copies,\nto give them a chance to provide you with an updated version of the\nDocument.\n\n4. MODIFICATIONS\n\nYou may copy and distribute a Modified Version of the Document\nunder the conditions of sections 2 and 3 above, provided that you\nrelease the Modified Version under precisely this License, with the\nModified Version filling the role of the Document, thus licensing\ndistribution and modification of the Modified Version to whoever\npossesses a copy of it.  In addition, you must do these things in\nthe Modified Version:\n\nA. Use in the Title Page (and on the covers, if any) a title\ndistinct from that of the Document, and from those of previous\nversions (which should, if there were any, be listed in the\nHistory section of the Document).  You may use the same title\nas a previous version if the original publisher of that\nversion gives permission.\n\nB. List on the Title Page, as authors, one or more persons or\nentities responsible for authorship of the modifications in\nthe Modified Version, together with at least five of the\nprincipal authors of the Document (all of its principal\nauthors, if it has fewer than five), unless they release you\nfrom this requirement.\n\nC. State on the Title page the name of the publisher of the\nModified Version, as the publisher.\n\nD. Preserve all the copyright notices of the Document.\n\nE. Add an appropriate copyright notice for your modifications\nadjacent to the other copyright notices.\n\nF. Include, immediately after the copyright notices, a license\nnotice giving the public permission to use the Modified\nVersion under the terms of this License, in the form shown in\nthe Addendum below.\n\nG. Preserve in that license notice the full lists of Invariant\nSections and required Cover Texts given in the Document's\nlicense notice.\n\nH. Include an unaltered copy of this License.\n\nI. Preserve the section Entitled \"History\", Preserve its Title,\nand add to it an item stating at least the title, year, new\nauthors, and publisher of the Modified Version as given on the\nTitle Page.  If there is no section Entitled \"History\" in the\nDocument, create one stating the title, year, authors, and\npublisher of the Document as given on its Title Page, then add\nan item describing the Modified Version as stated in the\nprevious sentence.\n\nJ. Preserve the network location, if any, given in the Document\nfor public access to a Transparent copy of the Document, and\nlikewise the network locations given in the Document for\nprevious versions it was based on.  These may be placed in the\n\"History\" section.  You may omit a network location for a work\nthat was published at least four years before the Document\nitself, or if the original publisher of the version it refers\nto gives permission.\n\nK. For any section Entitled \"Acknowledgements\" or \"Dedications\",\nPreserve the Title of the section, and preserve in the section\nall the substance and tone of each of the contributor\nacknowledgements and/or dedications given therein.\n\nL. Preserve all the Invariant Sections of the Document, unaltered\nin their text and in their titles.  Section numbers or the\nequivalent are not considered part of the section titles.\n\nM. Delete any section Entitled \"Endorsements\".  Such a section\nmay not be included in the Modified Version.\n\nN. Do not retitle any existing section to be Entitled\n\"Endorsements\" or to conflict in title with any Invariant\nSection.\n\nO. Preserve any Warranty Disclaimers.\n\nIf the Modified Version includes new front-matter sections or\nappendices that qualify as Secondary Sections and contain no\nmaterial copied from the Document, you may at your option designate\nsome or all of these sections as invariant.  To do this, add their\ntitles to the list of Invariant Sections in the Modified Version's\nlicense notice.  These titles must be distinct from any other\nsection titles.\n\nYou may add a section Entitled \"Endorsements\", provided it contains\nnothing but endorsements of your Modified Version by various\nparties--for example, statements of peer review or that the text\nhas been approved by an organization as the authoritative\ndefinition of a standard.\n\nYou may add a passage of up to five words as a Front-Cover Text,\nand a passage of up to 25 words as a Back-Cover Text, to the end of\nthe list of Cover Texts in the Modified Version.  Only one passage\nof Front-Cover Text and one of Back-Cover Text may be added by (or\nthrough arrangements made by) any one entity.  If the Document\nalready includes a cover text for the same cover, previously added\nby you or by arrangement made by the same entity you are acting on\nbehalf of, you may not add another; but you may replace the old\none, on explicit permission from the previous publisher that added\nthe old one.\n\nThe author(s) and publisher(s) of the Document do not by this\nLicense give permission to use their names for publicity for or to\nassert or imply endorsement of any Modified Version.\n\n5. COMBINING DOCUMENTS\n\nYou may combine the Document with other documents released under\nthis License, under the terms defined in section 4 above for\nmodified versions, provided that you include in the combination all\nof the Invariant Sections of all of the original documents,\nunmodified, and list them all as Invariant Sections of your\ncombined work in its license notice, and that you preserve all\ntheir Warranty Disclaimers.\n\nThe combined work need only contain one copy of this License, and\nmultiple identical Invariant Sections may be replaced with a single\ncopy.  If there are multiple Invariant Sections with the same name\nbut different contents, make the title of each such section unique\nby adding at the end of it, in parentheses, the name of the\noriginal author or publisher of that section if known, or else a\nunique number.  Make the same adjustment to the section titles in\nthe list of Invariant Sections in the license notice of the\ncombined work.\n\nIn the combination, you must combine any sections Entitled\n\"History\" in the various original documents, forming one section\nEntitled \"History\"; likewise combine any sections Entitled\n\"Acknowledgements\", and any sections Entitled \"Dedications\".  You\nmust delete all sections Entitled \"Endorsements.\"\n\n6. COLLECTIONS OF DOCUMENTS\n\nYou may make a collection consisting of the Document and other\ndocuments released under this License, and replace the individual\ncopies of this License in the various documents with a single copy\nthat is included in the collection, provided that you follow the\nrules of this License for verbatim copying of each of the documents\nin all other respects.\n\nYou may extract a single document from such a collection, and\ndistribute it individually under this License, provided you insert\na copy of this License into the extracted document, and follow this\nLicense in all other respects regarding verbatim copying of that\ndocument.\n\n7. AGGREGATION WITH INDEPENDENT WORKS\n\nA compilation of the Document or its derivatives with other\nseparate and independent documents or works, in or on a volume of a\nstorage or distribution medium, is called an \"aggregate\" if the\ncopyright resulting from the compilation is not used to limit the\nlegal rights of the compilation's users beyond what the individual\nworks permit.  When the Document is included in an aggregate, this\nLicense does not apply to the other works in the aggregate which\nare not themselves derivative works of the Document.\n\nIf the Cover Text requirement of section 3 is applicable to these\ncopies of the Document, then if the Document is less than one half\nof the entire aggregate, the Document's Cover Texts may be placed\non covers that bracket the Document within the aggregate, or the\nelectronic equivalent of covers if the Document is in electronic\nform.  Otherwise they must appear on printed covers that bracket\nthe whole aggregate.\n\n8. TRANSLATION\n\nTranslation is considered a kind of modification, so you may\ndistribute translations of the Document under the terms of section\n4.  Replacing Invariant Sections with translations requires special\npermission from their copyright holders, but you may include\ntranslations of some or all Invariant Sections in addition to the\noriginal versions of these Invariant Sections.  You may include a\ntranslation of this License, and all the license notices in the\nDocument, and any Warranty Disclaimers, provided that you also\ninclude the original English version of this License and the\noriginal versions of those notices and disclaimers.  In case of a\ndisagreement between the translation and the original version of\nthis License or a notice or disclaimer, the original version will\nprevail.\n\nIf a section in the Document is Entitled \"Acknowledgements\",\n\"Dedications\", or \"History\", the requirement (section 4) to\nPreserve its Title (section 1) will typically require changing the\nactual title.\n\n9. TERMINATION\n\nYou may not copy, modify, sublicense, or distribute the Document\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense, or distribute it is void,\nand will automatically terminate your rights under this License.\n\nHowever, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the\ncopyright holder fails to notify you of the violation by some\nreasonable means prior to 60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from\nthat copyright holder, and you cure the violation prior to 30 days\nafter your receipt of the notice.\n\nTermination of your rights under this section does not terminate\nthe licenses of parties who have received copies or rights from you\nunder this License.  If your rights have been terminated and not\npermanently reinstated, receipt of a copy of some or all of the\nsame material does not give you any rights to use it.\n\n10. FUTURE REVISIONS OF THIS LICENSE\n\nThe Free Software Foundation may publish new, revised versions of\nthe GNU Free Documentation License from time to time.  Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.  See\n<https://www.gnu.org/licenses/>.\n\nEach version of the License is given a distinguishing version\nnumber.  If the Document specifies that a particular numbered\nversion of this License \"or any later version\" applies to it, you\nhave the option of following the terms and conditions either of\nthat specified version or of any later version that has been\npublished (not as a draft) by the Free Software Foundation.  If the\nDocument does not specify a version number of this License, you may\nchoose any version ever published (not as a draft) by the Free\nSoftware Foundation.  If the Document specifies that a proxy can\ndecide which future versions of this License can be used, that\nproxy's public statement of acceptance of a version permanently\nauthorizes you to choose that version for the Document.\n\n11. RELICENSING\n\n\"Massive Multiauthor Collaboration Site\" (or \"MMC Site\") means any\nWorld Wide Web server that publishes copyrightable works and also\nprovides prominent facilities for anybody to edit those works.  A\npublic wiki that anybody can edit is an example of such a server.\nA \"Massive Multiauthor Collaboration\" (or \"MMC\") contained in the\nsite means any set of copyrightable works thus published on the MMC\nsite.\n\n\"CC-BY-SA\" means the Creative Commons Attribution-Share Alike 3.0\nlicense published by Creative Commons Corporation, a not-for-profit\ncorporation with a principal place of business in San Francisco,\nCalifornia, as well as future copyleft versions of that license\npublished by that same organization.\n\n\"Incorporate\" means to publish or republish a Document, in whole or\nin part, as part of another Document.\n\nAn MMC is \"eligible for relicensing\" if it is licensed under this\nLicense, and if all works that were first published under this\nLicense somewhere other than this MMC, and subsequently\nincorporated in whole or in part into the MMC, (1) had no cover\ntexts or invariant sections, and (2) were thus incorporated prior\nto November 1, 2008.\n\nThe operator of an MMC Site may republish an MMC contained in the\nsite under CC-BY-SA on the same site at any time before August 1,\n2009, provided the MMC is eligible for relicensing.\n",
            "subsections": [
                {
                    "name": "ADDENDUM: How to use this License for your documents",
                    "content": ""
                }
            ]
        },
        "To use this License in a document you have written, include a copy of": {
            "content": "the License in the document and put the following copyright and license\nnotices just after the title page:\n\nCopyright (C)  YEAR  YOUR NAME.\nPermission is granted to copy, distribute and/or modify this document\nunder the terms of the GNU Free Documentation License, Version 1.3\nor any later version published by the Free Software Foundation;\nwith no Invariant Sections, no Front-Cover Texts, and no Back-Cover\nTexts.  A copy of the license is included in the section entitled ``GNU\nFree Documentation License''.\n\nIf you have Invariant Sections, Front-Cover Texts and Back-Cover\nTexts, replace the \"with...Texts.\" line with this:\n\nwith the Invariant Sections being LIST THEIR TITLES, with\nthe Front-Cover Texts being LIST, and with the Back-Cover Texts\nbeing LIST.\n\nIf you have Invariant Sections without Cover Texts, or some other\ncombination of the three, merge those two alternatives to suit the\nsituation.\n\nIf your document contains nontrivial examples of program code, we\nrecommend releasing these examples in parallel under your choice of free\nsoftware license, such as the GNU General Public License, to permit\ntheir use in free software.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Translations,  Next: Index,  Prev: Copying This Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "Appendix B Translations of This Manual": {
            "content": "",
            "subsections": []
        },
        "Nishio Futoshi of the GNUjdoc project has prepared a Japanese": {
            "content": "translation of this manual.  Its most recent version can be found at\n<http://openlab.ring.gr.jp/gnujdoc/cvsweb/cvsweb.cgi/gnujdoc/>.\n",
            "subsections": []
        },
        "File: diffutils.info,  Node: Index,  Prev: Translations,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "Appendix C Index": {
            "content": "* Menu:\n\n* POSIX2VERSION:                       Standards conformance.\n(line  23)\n* ! output format:                       Context.             (line   6)\n* +- output format:                      Unified Format.      (line   6)\n* < output format:                       Normal.              (line   6)\n* <<<<<<< for marking conflicts:         Marking Conflicts.   (line   6)\n* ad capability:                         diff Options.        (line 182)\n* aligning tab stops:                    Tabs.                (line   6)\n* alternate file names:                  Alternate Names.     (line   6)\n* always color option:                   diff Options.        (line  46)\n* auto color option:                     diff Options.        (line  44)\n* backup file names:                     Backup Names.        (line   6)\n* backup file strategy:                  Backups.             (line   6)\n* binary file diff:                      Binary.              (line   6)\n* blank and tab difference suppression:  White Space.         (line   6)\n* blank line difference suppression:     Blank Lines.         (line   6)\n* brief difference reports:              Brief.               (line   6)\n* bug reports:                           Bugs.                (line   6)\n* C function headings:                   C Function Headings. (line   6)\n* C if-then-else output format:          If-then-else.        (line   6)\n* case difference suppression:           Case Folding.        (line   6)\n* ClearCase:                             Revision Control.    (line   6)\n* cmp invocation:                        Invoking cmp.        (line   6)\n* cmp options:                           cmp Options.         (line   6)\n* color, distinguishing different context: diff Options.      (line  37)\n* columnar output:                       Side by Side.        (line   6)\n* common mistakes with patches:          Avoiding Common Mistakes.\n(line   6)\n* comparing three files:                 Comparing Three Files.\n(line   6)\n* conflict:                              diff3 Merging.       (line  26)\n* conflict marking:                      Marking Conflicts.   (line   6)\n* context output format:                 Context.             (line   6)\n* creating files:                        Creating and Removing.\n(line   6)\n* de capability:                         diff Options.        (line 187)\n* diagnostics from patch:                patch Messages.      (line   6)\n* diff invocation:                       Invoking diff.       (line   6)\n* diff merging:                          Interactive Merging. (line   6)\n* diff options:                          diff Options.        (line   6)\n* diff sample input:                     Sample diff Input.   (line   6)\n* diff3 hunks:                           diff3 Hunks.         (line   6)\n* diff3 invocation:                      Invoking diff3.      (line   6)\n* diff3 options:                         diff3 Options.       (line   6)\n* diff3 sample input:                    Sample diff3 Input.  (line   6)\n* directories and patch:                 patch Directories.   (line   6)\n* directory structure changes:           Changing Structure.  (line   6)\n* dry runs for patch:                    Dry Runs.            (line   6)\n* ed script output format:               ed Scripts.          (line   6)\n* EDITOR:                                Merge Commands.      (line  50)\n* empty files, removing:                 Creating and Removing.\n(line   6)\n* exabyte, definition of:                cmp Options.         (line  99)\n* exbibyte, definition of:               cmp Options.         (line 102)\n* file name alternates:                  Alternate Names.     (line   6)\n* file names with unusual characters:    Unusual File Names.  (line   6)\n* format of diff output:                 Output Formats.      (line   6)\n* format of diff3 output:                Comparing Three Files.\n(line   6)\n* formats for if-then-else line groups:  Line Group Formats.  (line   6)\n* forward ed script output format:       Forward ed.          (line   6)\n* full lines:                            Incomplete Lines.    (line   6)\n* function headings, C:                  C Function Headings. (line   6)\n* fuzz factor when patching:             Inexact.             (line   6)\n* gibibyte, definition of:               cmp Options.         (line  87)\n* gigabyte, definition of:               cmp Options.         (line  84)\n* hd capability:                         diff Options.        (line 192)\n* headings:                              Sections.            (line   6)\n* hunks:                                 Hunks.               (line   6)\n* hunks for diff3:                       diff3 Hunks.         (line   6)\n* if-then-else output format:            If-then-else.        (line   6)\n* ifdef output format:                   If-then-else.        (line   6)\n* imperfect patch application:           Imperfect.           (line   6)\n* incomplete line merging:               Merging Incomplete Lines.\n(line   6)\n* incomplete lines:                      Incomplete Lines.    (line   6)\n* inexact patches:                       Inexact.             (line   6)\n* inhibit messages from patch:           More or Fewer Messages.\n(line   6)\n* interactive merging:                   Interactive Merging. (line   6)\n* introduction:                          Comparison.          (line   6)\n* intuiting file names from patches:     Multiple Patches.    (line   6)\n* invoking cmp:                          Invoking cmp.        (line   6)\n* invoking diff:                         Invoking diff.       (line   6)\n* invoking diff3:                        Invoking diff3.      (line   6)\n* invoking patch:                        Invoking patch.      (line   6)\n* invoking sdiff:                        Invoking sdiff.      (line   6)\n* keyboard input to patch:               patch and Keyboard Input.\n(line   6)\n* kibibyte, definition of:               cmp Options.         (line  75)\n* kilobyte, definition of:               cmp Options.         (line  71)\n* LCCOLLATE:                            Comparing Directories.\n(line   6)\n* LCNUMERIC:                            Line Group Formats.  (line 143)\n* LCTIME:                               Detailed Context.    (line  12)\n* line formats:                          Line Formats.        (line   6)\n* line group formats:                    Line Group Formats.  (line   6)\n* ln capability:                         diff Options.        (line 197)\n* mebibyte, definition of:               cmp Options.         (line  82)\n* megabyte, definition of:               cmp Options.         (line  79)\n* merge commands:                        Merge Commands.      (line   6)\n* merged diff3 format:                   Bypassing ed.        (line   6)\n* merged output format:                  If-then-else.        (line   6)\n* merging from a common ancestor:        diff3 Merging.       (line   6)\n* merging interactively:                 Merge Commands.      (line   6)\n* messages from patch:                   patch Messages.      (line   6)\n* multibyte characters:                  Internationalization.\n(line   6)\n* multiple patches:                      Multiple Patches.    (line   6)\n* newline treatment by diff:             Incomplete Lines.    (line   6)\n* none color option:                     diff Options.        (line  41)\n* normal output format:                  Normal.              (line   6)\n* options for cmp:                       cmp Options.         (line   6)\n* options for diff:                      diff Options.        (line   6)\n* options for diff3:                     diff3 Options.       (line   6)\n* options for patch:                     patch Options.       (line   6)\n* options for sdiff:                     sdiff Options.       (line   6)\n* output formats:                        Output Formats.      (line   6)\n* overlap:                               diff3 Merging.       (line  26)\n* overlapping change, selection of:      Which Changes.       (line   6)\n* overview of diff and patch:            Overview.            (line   6)\n* paginating diff output:                Pagination.          (line   6)\n* patch consumer tips:                   Tips for Patch Consumers.\n(line   6)\n* patch input format:                    patch Input.         (line   6)\n* patch invocation:                      Invoking patch.      (line   6)\n* patch messages and questions:          patch Messages.      (line   6)\n* patch options:                         patch Options.       (line   6)\n* patch producer tips:                   Tips for Patch Producers.\n(line   6)\n* PATCHGET:                             Revision Control.    (line  13)\n* PATCHVERSIONCONTROL:                 Backup Names.        (line  21)\n* patch, common mistakes:                Avoiding Common Mistakes.\n(line   6)\n* patches, shrinking:                    Generating Smaller Patches.\n(line   6)\n* patching directories:                  patch Directories.   (line   6)\n* pebibyte, definition of:               cmp Options.         (line  97)\n* performance of diff:                   diff Performance.    (line   6)\n* petabyte, definition of:               cmp Options.         (line  94)\n* POSIX:                                 patch and POSIX.     (line   6)\n* POSIX <1>:                             Standards conformance.\n(line   6)\n* POSIXLYCORRECT:                       patch and POSIX.     (line   6)\n* POSIXLYCORRECT <1>:                   Standards conformance.\n(line   6)\n* projects for directories:              Shortcomings.        (line   6)\n* quoting style:                         patch Quoting Style. (line   6)\n* QUOTINGSTYLE:                         patch Quoting Style. (line  26)\n* RCS:                                   Revision Control.    (line   6)\n* RCS script output format:              RCS.                 (line   6)\n* regular expression matching headings:  Specified Headings.  (line   6)\n* regular expression suppression:        Specified Lines.     (line   6)\n* reject file names:                     Reject Names.        (line   6)\n* removing empty files:                  Creating and Removing.\n(line   6)\n* reporting bugs:                        Bugs.                (line   6)\n* reversed patches:                      Reversed Patches.    (line   6)\n* revision control:                      Revision Control.    (line   6)\n* sample input for diff:                 Sample diff Input.   (line   6)\n* sample input for diff3:                Sample diff3 Input.  (line   6)\n* SCCS:                                  Revision Control.    (line   6)\n* script output formats:                 Scripts.             (line   6)\n* sdiff invocation:                      Invoking sdiff.      (line   6)\n* sdiff options:                         sdiff Options.       (line   6)\n* sdiff output format:                   sdiff Option Summary.\n(line   6)\n* section headings:                      Sections.            (line   6)\n* side by side:                          Side by Side.        (line   6)\n* side by side format:                   Side by Side Format. (line   6)\n* SIMPLEBACKUPSUFFIX:                  Backup Names.        (line  12)\n* special files:                         Special Files.       (line   6)\n* specified headings:                    Specified Headings.  (line   6)\n* summarizing which files differ:        Brief.               (line   6)\n* System V diff3 compatibility:          Saving the Changed File.\n(line   6)\n* tab and blank difference suppression:  White Space.         (line   6)\n* tab stop alignment:                    Tabs.                (line   6)\n* tebibyte, definition of:               cmp Options.         (line  92)\n* terabyte, definition of:               cmp Options.         (line  89)\n* terminal, using color iff:             diff Options.        (line  44)\n* testing patch:                         Dry Runs.            (line   6)\n* text versus binary diff:               Binary.              (line   6)\n* timestamp format, context diffs:       Detailed Context.    (line  12)\n* timestamp format, unified diffs:       Detailed Unified.    (line  12)\n* timestamps on patched files:           Patching Timestamps. (line   6)\n* traditional patch:                     patch and Tradition. (line   6)\n* trailing blanks:                       Trailing Blanks.     (line   6)\n* two-column output:                     Side by Side.        (line   6)\n* unified output format:                 Unified Format.      (line   6)\n* unmerged change:                       Which Changes.       (line   6)\n* varying-width characters:              Internationalization.\n(line   6)\n* verbose messages from patch:           More or Fewer Messages.\n(line   6)\n* version control:                       Revision Control.    (line   6)\n* VERSIONCONTROL:                       Revision Control.    (line  22)\n* VERSIONCONTROL <1>:                   Backup Names.        (line  21)\n* white space in patches:                Changed White Space. (line   6)\n* yottabyte, definition of:              cmp Options.         (line 110)\n* zettabyte, definition of:              cmp Options.         (line 104)\n\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}