Linux "diff3" Command Line Options and Examples
compare three files line by line

Compare three files line by line. Mandatory arguments to long options are mandatory for short options too.


Usage:

diff3 [OPTION]... MYFILE OLDFILE YOURFILE






Command Line Options:

-A
output all changes, bracketing conflicts
diff3 -A ...
-e
output ed script incorporating changes from OLDFILE to YOURFILE into MYFILE
diff3 -e ...
-E
like -e, but bracket conflicts
diff3 -E ...
-3
like -e, but incorporate only nonoverlapping changes
diff3 -3 ...
-x
like -e, but incorporate only overlapping changes
diff3 -x ...
-X
but bracket conflicts
diff3 -X ...
-i
append 'w' and 'q' commands to ed scripts
diff3 -i ...
-m
output actual merged file, according to -A if no other options are given
diff3 -m ...
-a
treat all files as text
diff3 -a ...
--strip-trailing-cr
strip trailing carriage return on input
diff3 --strip-trailing-cr ...
-T
make tabs line up by prepending a tab
diff3 -T ...
--diff-program
use PROGRAM to compare files
diff3 --diff-program ...
-L
use LABEL instead of file name (can be repeated up to three times)
diff3 -L ...
--help
display this help and exit
diff3 --help ...
-v
output version information and exitThe default output format is a somewhat human-readable representation of the changes.The -e, -E, -x, -X (and corresponding long) options cause an ed script to be output instead of the default.Finally, the -m (--merge) option causes diff3 to do the merge internally and output the actual merged file. For unusual input, thisis more robust than using ed.If a FILE is '-', read standard input. Exit status is 0 if successful, 1 if conflicts, 2 if trouble.AUTHORWritten by Randy Smith.REPORTING BUGSReport bugs to: bug-diffutils@gnu.orgGNU diffutils home page: <http://www.gnu.org/software/diffutils/>General help using GNU software: <http://www.gnu.org/gethelp/>COPYRIGHTCopyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
diff3 -v ...