Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/help/en/bash/diff3.html
diff options
context:
space:
mode:
Diffstat (limited to 'help/en/bash/diff3.html')
-rw-r--r--help/en/bash/diff3.html179
1 files changed, 179 insertions, 0 deletions
diff --git a/help/en/bash/diff3.html b/help/en/bash/diff3.html
new file mode 100644
index 0000000..2daa924
--- /dev/null
+++ b/help/en/bash/diff3.html
@@ -0,0 +1,179 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
+<head>
+<link rel="STYLESHEET" href="../term_tools/main.css" type="text/css">
+<title>diff3 MAN Page</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head><body><!-- #BeginLibraryItem "/Library/head_bash.lbi" --><div id="nav-menu">
+<ul>
+<li><a class="rl" href="../term_tools/index.html"><img src="../term_tools/images/ss64.gif" title="Home" alt="Home"></a></li>
+<li><a class="rl" href="../term_tools/bash"><img src="../term_tools/images/bash-l.gif" title="bash" alt="bash"></a></li>
+<li><!-- Search Google -->
+<form action="http://www.google.com/search" method="get" style="margin:0px;padding:0px;">
+<div align="right">
+<input name="q" type="text" class="body" size="25">
+<input class="submit" type="submit" value="Search">
+<input type="hidden" name="q" value="site:ss64.com/bash/">
+</div>
+</form></li>
+<li><a class="rr" href="syntax.html"><img src="../term_tools/images/syntax-r.gif" title="Bash Syntax"></a></li>
+</ul>
+</div> <!-- #EndLibraryItem --><h1>diff3</h1>
+<p>Show differences among three files.<br>
+ When two people have made independent changes to a common original, `diff3'
+ can report the differences between the original and the two changed versions,
+ and can produce a merged file that contains both persons' changes together with
+ warnings about conflicts.<br>
+ The files to compare are MINE, OLDER, and YOURS. At most one of these three
+ file names may be `-', which tells `diff3' to read the standard input for that
+ file.<br>
+</p>
+<pre>SYNTAX
+ diff3 [<i>options</i>] <i>mine older yours</i>
+
+OPTIONS
+`-a'
+ Treat all files as text and compare them line-by-line, even if they
+ do not appear to be text.
+
+`-A'
+ Incorporate all changes from OLDER to YOURS into MINE, surrounding
+ all conflicts with bracket lines. *Note Marking Conflicts::.
+
+`-e'
+ Generate an `ed' script that incorporates all the changes from
+ OLDER to YOURS into MINE. *Note Which Changes::.
+
+`-E'
+ Like `-e', except bracket lines from overlapping changes' first
+ and third files. *Note Marking Conflicts::. With `-e', an
+ overlapping change looks like this:
+
+ <<<<<<< MINE
+ lines from MINE
+ =======
+ lines from YOURS
+ >>>>>>> YOURS
+
+`--ed'
+ Generate an `ed' script that incorporates all the changes from
+ OLDER to YOURS into MINE. *Note Which Changes::.
+
+`--easy-only'
+ Like `-e', except output only the nonoverlapping changes. *Note
+ Which Changes::.
+
+`-i'
+ Generate `w' and `q' commands at the end of the `ed' script for
+ System V compatibility. This option must be combined with one of
+ the `-AeExX3' options, and may not be combined with `-m'. *Note
+ Saving the Changed File::.
+
+`--initial-tab'
+ Output a tab rather than two spaces before the text of a line in
+ normal format. This causes the alignment of tabs in the line to
+ look normal. *Note Tabs::.
+
+`-L LABEL'
+`--label=LABEL'
+ Use the label LABEL for the brackets output by the `-A', `-E' and
+ `-X' options. This option may be given up to three times, one for
+ each input file. The default labels are the names of the input
+ files. Thus `diff3 -L X -L Y -L Z -m A B C' acts like `diff3 -m A
+ B C', except that the output looks like it came from files named
+ `X', `Y' and `Z' rather than from files named `A', `B' and `C'.
+ *Note Marking Conflicts::.
+
+`-m'
+`--merge'
+ Apply the edit script to the first file and send the result to
+ standard output. Unlike piping the output from `diff3' to `ed',
+ this works even for binary files and incomplete lines. `-A' is
+ assumed if no edit script option is specified. *Note Bypassing
+ ed::.
+
+`--overlap-only'
+ Like `-e', except output only the overlapping changes. *Note
+ Which Changes::.
+
+`--show-all'
+ Incorporate all unmerged changes from OLDER to YOURS into MINE,
+ surrounding all overlapping changes with bracket lines. *Note
+ Marking Conflicts::.
+
+`--show-overlap'
+ Like `-e', except bracket lines from overlapping changes' first
+ and third files. *Note Marking Conflicts::.
+
+`-T'
+ Output a tab rather than two spaces before the text of a line in
+ normal format. This causes the alignment of tabs in the line to
+ look normal. *Note Tabs::.
+
+`--text'
+ Treat all files as text and compare them line-by-line, even if they
+ do not appear to be text. *Note Binary::.
+
+`-v'
+`--version'
+ Output the version number of `diff3'.
+
+`-x'
+ Like `-e', except output only the overlapping changes. *Note
+ Which Changes::.
+
+`-X'
+ Like `-E', except output only the overlapping changes. In other
+ words, like `-x', except bracket changes as in `-E'. *Note
+ Marking Conflicts::.
+
+`-3'
+ Like `-e', except output only the nonoverlapping changes. </pre>
+<p> <b>Notes</b><br>
+ `diff3' normally compares three input files line
+ by line, finds groups of lines that differ, and reports each group of differing
+ lines. Its output is designed to make it easy to inspect two different sets
+ of changes to the same file. <br>
+ <br>
+ If `diff3' thinks that any of the files it is comparing is binary (a non-text
+ file), it normally reports an error, because such comparisons are usually not
+ useful. As with `diff', you can force `diff3' to consider all files to be text
+ files and compare them line by line by using the `-a' or `--text' options. <br>
+ <b><br>
+ </b>Multiple single letter options (unless they take an argument) can be combined
+ into a single command line argument.</p>
+<p>An exit status of 0 means diff3 was successful, 1 means some conflicts
+ were found, and 2 means trouble.</p>
+<p> <i>"One person can make a difference and every person must try"
+ ~ John
+ F. Kennedy</i></p>
+<p><b>Related bash commands</b>:<br>
+ <br>
+ <a href="cmp.html">cmp</a> - Compare two files<br>
+ <a href="diff.html">diff</a> - Display the differences between two files <br>
+ <a href="sdiff.html">sdiff</a> - merge two files interactively<br>
+Equivalent Windows commands: <a href="../term_tools/nt/comp.html">COMP</a> / <a href="../term_tools/nt/fc.html">FC</a> - Compare and display Characters/Lines which do not match.<br>
+(also the WINDIFF GUI)</p>
+<!-- #BeginLibraryItem "/Library/foot_bash.lbi" --><p align="left"><script type="text/javascript"><!--
+google_ad_client = "pub-6140977852749469";
+google_ad_width = 300;
+google_ad_height = 250;
+google_ad_format = "300x250_as";
+google_ad_type = "text_image";
+google_ad_channel ="1984328893";
+google_color_border = "CCCCCC";
+google_color_bg = "CCCCCC";
+google_color_link = "000000";
+google_color_text = "333333";
+google_color_url = "0000FF";
+//--></script>
+<script type="text/javascript"
+ src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script><br>
+</p>
+<div align="center"><hr size="1">
+ <p id="top"><a href="#"><img src="../term_tools/images/top-4.gif" width="47" height="53" border="0" alt="Back to the Top" title="Back to the Top"></a></p>
+ <p class="tagline">&copy; Copyright <a href="http://ss64.com/">SS64.com</a> 1999-2010<br>
+Some rights reserved<br>
+</p>
+</div><!-- #EndLibraryItem --></body>
+</html>