Skip to main content

11.10) Blank Spaces


If the files you are creating have differences in the blank spaces and you want to ignore this then use the –b option of sdiff. To test this, make a copy of file1 and call it file6 and put some spaces between the 0.6 and 6.2 values. Save the changes and then use the same command as before:

sdiff file1 file6

The results indicate there is a difference on that line even though the numbers are numerically the same.

Now try again but with the –b option.

sdiff –b file1 file6

Now you will see the files are considered equal. You can use the –b option with diff as well and no difference will arise but without the –b it will flag a difference. So this option, which is one of a huge number of options allows you to focus in on changes in numbers rather than less important changes that may occur in outputs.