博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Comparing and Merging Files with GNU diff and p...
阅读量:6582 次
发布时间:2019-06-24

本文共 1615 字,大约阅读时间需要 5 分钟。

  hot3.png

Picture of Cover

Comparing and Merging Files with GNU diff and patch

by David MacKenzie, Paul Eggert, and Richard Stallman
Paperback (6"x9"), 120 pages
ISBN 0954161750
RRP £12.95 ($19.95)
"Well packaged... the quality of information is excellent" --- Linux User and Developer Magazine (Issue 36, Feb 2004) Get a printed copy>>>
Comparing and Merging Files with GNU diff and patch

Buy the book here! >>>

learn more

2.3 Showing Differences in Their Context

Usually, when you are looking at the differences between files, you will also want to see the parts of the files near the lines that differ, to help you understand exactly what has changed. These nearby parts of the files are called the context.

GNU diff provides two output formats that show context around the differing lines: context format and unified format. It can optionally show in which function or section of the file the differing lines are found.

If you are distributing new versions of files to other people in the form of diff output, you should use one of the output formats that show context so that they can apply the diffs even if they have made small changes of their own to the files. patch can apply the diffs in this case by searching in the files for the lines of context around the differing lines; if those lines are actually a few lines away from where the diff says they are, patch can adjust the line numbers accordingly and still apply the diff correctly. See section 10.3 Applying Imperfect Patches, for more information on using patch to apply imperfect diffs.

<<< previous table of contents next >>>

转载于:https://my.oschina.net/tadcat/blog/147782

你可能感兴趣的文章
NOIP2013花匠
查看>>
告别脚本小子【编写端口扫描工具】
查看>>
监控录像
查看>>
HtmlHelper使用大全
查看>>
SQLServer 之 聚合函数
查看>>
正则输入非0的整数
查看>>
TortoiseGit与GitHub项目关联设置
查看>>
java模式:深入单例模式
查看>>
Struts2的模板和主题theme及自定义theme的使用
查看>>
ImageView显示图像控件
查看>>
Deepin-文件目录介绍
查看>>
MySQL数据库如何去掉数据库中重复记录
查看>>
【原创】如何写一篇“用户友好”的随笔
查看>>
【16】成对使用new和delete时要采取相同形式
查看>>
POJ 2352 Stars
查看>>
SharpRush中的AOP实现
查看>>
[摘自DbC原则与实践]DbC的一些优点和限制
查看>>
WinForm 清空界面控件值的小技巧[转]
查看>>
PhantomJS
查看>>
» 在 Ubuntu 上使用 sshfs 映射远程 ssh 文件系统为本地磁盘 Wow! Ubuntu
查看>>