tags:

views:

56

answers:

1

How can I diff two files and ignore lines starting with a sequence. E.g

File1:
abc
def
time:123

File2:
igh
def
time:345

With unix diff it will report

<time:123
>time:345

I want to ignore this diff. Any ideas?

+2  A: 

How about: diff -I '^time.*' file1 file2 ?

nc3b