diff Command output format description

Source: Internet
Author: User
Tags diff
Diff's Output format:

Change-command
< From-file-line
< From-file-line ...
---
> To-file-line
> To-file-line ...

The format of the diff command is used in the following ways:
Diff From-file To-fille

If you modify from-file according to the output Change-command, you can get the same file content as To-file.

Lar exmaple:8a12,15 in the 8th line of the first file, insert the 2nd file 12-15 lines of text, so that the contents of the 1th file and 2nd file, in the 2nd 12-15 lines deleted, the file content will be the same as the first file

FCT example:5,7c8,10 5-7 lines in the first stall to 8-10 lines in the 2nd file, and the contents of the 1th file are the same as the 2nd file.

The RDL example:5,7d3 removes 5-7 lines from the 1th file, making the 1th file the same as the 2nd file. To modify the contents of the 2nd file so that it is the same as the 1th file, insert the 5-7 line of the 1th file at the 2nd document 3rd line.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.