Diff Ignore whitespace and line breaks [duplicate]

1

Does anyone know of a diff tool that can ignore all white space and line breaks?

Ex:

File1.html
<html>
    <head>
        <title>Title</title>

File2.html
<html><head>
        <title>
            Title
        </title>

But when it comes to comparing:

File1.html
<html><head><title>Title</title>

File2.html
<html><head><title>Title</title>
    
asked by anonymous 02.09.2015 / 20:51

1 answer

1

You can use the diff tool for this.

Argument -b : Ignores changes in the amount of spaces in white.

diff -b arq_1.txt arq_2.txt

Argument -B : Ignores changes in the amount of lines in white.

diff -B arq_1.txt arq_2.txt

Source: diff documentation .

    
02.09.2015 / 20:57