1

Here's what I'm sure is an easy one, but I can't figure it out.

I have two files:

file1: You are in a maze of twisty little passages, all alike
file2: You are in a maze of twisty little* passages, all alike

I want to perform sdiff on these files, but I want to ignore the * character.

How do I do this?

Runcible
  • 3,145
  • 3
  • 23
  • 15

1 Answers1

1

Actually, -I will ignore the whole line I think, not the character. If you want to ignore the character you can:

sdiff <(cat file1 | tr -d '*') <(cat file2 | tr -d '*')

Reference from man sdiff:

-I RE  --ignore-matching-lines=RE
              Ignore changes whose lines all match RE.
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448