1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
henrik@Henriks-MacBook-Pro:~/temp$ cat file1
a
b
c
d
e
f
henrik@Henriks-MacBook-Pro:~/temp$ cat file2
a
x
c
d
y
f
henrik@Henriks-MacBook-Pro:~/temp$ diff -U 0 file1 file2
--- file1	2012-12-19 16:42:51.000000000 +0100
+++ file2	2012-12-19 16:42:43.000000000 +0100
@@ -2 +2 @@
-b
+x
@@ -5 +5 @@
-e
+y
henrik@Henriks-MacBook-Pro:~/temp$ diff -U 0 file1 file2 | grep  -c ^@ 
2