You can use diff -b or –ignore-space-change options to ignore changes in the amount of white space.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
## ignore changes in the amount of white space echo "hello world" > myfile1 ## create some files echo "hello world" > myfile2 diff myfile1 myfile2 ## normal output ## returns ## 1c1 ## < hello world ## --- ## > hello world diff -b myfile1 myfile2 ## ignore changes in the amount of white space ## returns nothing as white space spacing is ignored rm -r my* |