ivaneeo's blog

自由的力量,自由的生活。

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
并排(side-by-side)格式虽然对于创建源代码补丁来说没有什么用处,但是用它直接比较源代码文件比较容易,因为它把srcfile和dstfile的内容并排显示在屏幕上.
ivan@debian $diff -y -W 80 hello.c howdy.c
#include <stdio.h>                    #include <stdio.h>
                                 >    #include <stdlib.h>
int main(void)                        int main(void)
{                                     {
  char msg[] = "Hello, Linux pr  |       char msg[] = "Hello, Linux pr
                                      
  puts(msg);
  printf("Here you are, using d  |  printf("Here you are, using d
                                
  return 0;                      |  exit(EXIT_SUCCESS);
}

字符">"表示该行在dstfile而不在srcfile里.类型地,字符"<"表示该行在srcfile而不在dstfile里.字符"|"标记出两个文件不相同的行.
posted on 2005-08-04 17:22 ivaneeo 阅读(223) 评论(0)  编辑  收藏 所属分类: GNU牛力

只有注册用户登录后才能发表评论。


网站导航: