For example, `5,7c8,10' means change lines 5-7 ofįile 1 to read as lines 8-10 of file 2 or, if changing file 2 intoįile 1, change lines 8-10 of file 2 to read as lines 5-7 of file 1.ĭelete the lines in range R from the first file line L is where This is like a combined add and delete, but Replace the lines in range F of the first file with lines in range For example, `8a12,15' means append lines 12-15 ofįile 2 after line 8 of file 1 or, if changing file 2 into file 1, The types of changeĪdd the lines in range R of the second file after line L of theįirst file. All line numbersĪre the original line numbers in each file. Number or comma-separated range of lines in the first file, a singleĬharacter indicating the kind of change to make, and a line number orĬomma-separated range of lines in the second file. There are three types of change commands. The normal output format consists of one or more hunks of differences Įach hunk shows one area where the files differ. In this case, the section your are interested in is: 2.4.2 Detailed Description of Normal Format you can access these by running info command, for example info diff.
#Using araxis merge to output text diff manuals
Many *nix utilities offer TeXinfo manuals as well as the simpler man pages.
#Using araxis merge to output text diff Patch
The 3d2 and 5a5 can be ignored, they are commands for patch which is often used with diff. Given a diff file1 file2, means the line is missing in file1.
Here - denotes the lines which were deleted from file1.txt, and + denotes the lines which were added. And the same about the file2.txt - diff shows us 5 lines starting from line 1.Īs I have already said, the lines from both files are shown together this is the original text
They tell us that diff will show a piece of text, which is 5 lines long starting from line number 1 in file1.txt. In the line -1,5 +1,5 the part -1,5 relates to file1.txt and the part +1,5 to file2.txt. Here diff shows us a single piece of the text, instead of two separate texts. The output of diff -u command is formatted a bit differently (so called "unified diff" format). 5a5 tells you that the we started from line number 5 in file1.txt (which was actually empty after we deleted a line in previous action), added the line and this added line is the number 5 in file2.txt.
So 3d2 tells you that the 3rd line in file1.txt was deleted and has the line number 2 in file2.txt (or better to say that after deletion the line counter went back to line number 2). the number on the left of the character is the line number in file1.txt, the number on the right is the line number in file2.txt. d stands for deletion, a stands for adding (and c stands for changing). In your first diff output (so called "normal diff") the meaning is as follows:ģd2 and 5a5 denote line numbers affected and which actions were performed.