[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug with `-w' (`--ignore-all-space') option
From: |
Khalukhin Alexander |
Subject: |
Bug with `-w' (`--ignore-all-space') option |
Date: |
Wed, 11 Nov 2009 21:25:57 +0300 |
Here are two simple text files:
address@hidden 1]$ cat test1.txt
a a a a
address@hidden 1]$ cat test2.txt
a
a
a
a
Now I'm trying to find difference, using -w (or --ignore-all-space) option:
address@hidden 1]$ diff -w test1.txt test2.txt
1c1,4
< a a a a
---
> a
> a
> a
> a
But judging to MANs they should have no differences:
http://www.gnu.org/software/diffutils/manual/html_node/diff-Options.html#diff%20Options
-w --ignore-all-space Ignore white space when comparing lines. See White
Space<http://www.gnu.org/software/diffutils/manual/html_node/White-Space.html#White%20Space>.
http://www.gnu.org/software/diffutils/manual/html_node/White-Space.html#White%20Space
The -w and --ignore-all-space options are stronger still. They ignore
difference even if one line has white space where the other line has
none. White
space characters include tab, *newline*, vertical tab, form feed, carriage
return, and space; some locales may define additional characters to be white
space.
Is it a BUG? Or how can I get wishing result (ignore newlines while
comparing)?
- Bug with `-w' (`--ignore-all-space') option,
Khalukhin Alexander <=