[TAG] 2 Cent Tip: Tell diff to ignore whitespaces
Suramya Tomar
security at suramya.com
Fri Nov 11 01:27:39 MSK 2005
Remembered this while reading the emails going back and forth between
Peter and Ben about diff'ing files.
To tell diff to ignore white spaces and do a case-insensitive comparison
use the following command:
diff -ibw FirstFile SecondFile
Where
-b Ignores trailing blanks (spaces and tabs) and treats
other strings of blanks as equivalent.
-i Ignores the case of letters
-w Ignores all blanks (SPACE and TAB characters) and
treats all other strings of blanks as equivalent; for
example, `if ( a == b )' will compare equal to
`if(a==b)'.
Hope this helps.
- Suramya
--
----------------------------------------------------------
Mountain Dew and doughnuts... because breakfast is the
most important meal of the day
----------------------------------------------------------
Name : Suramya Tomar
Homepage URL: http://www.suramya.com
-------------------------------------------------
************************************************************
Disclaimer:
Any errors in spelling, tact, or fact are transmission errors.
************************************************************
More information about the TAG
mailing list