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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about:
diff -I '^time.*' file1 file2?Please note it doesn’t always work as expected as per
diffutilsmanual: