diff -w might be your friend.

  $ diff -wus <(printf "ab cd\n") <(printf " ab  cd \n")
  Les fichiers /dev/fd/63 et /dev/fd/62 sont identiques

On 2024-07-24 13:59, Vincent Lefevre wrote:
There should be an option to ignore leading white space, like
there is one for trailing white space, and it should probably
be integrated in the -b option.

Basically, I'd like to be able to get only lines that differ by words.

Currently:

cventin:~> diff -bu <(printf "ab cd\n") <(printf " ab  cd \n")
--- /proc/self/fd/11    2024-07-24 13:58:43.515131625 +0200
+++ /proc/self/fd/14    2024-07-24 13:58:43.515131625 +0200
@@ -1 +1 @@
-ab cd
+ ab  cd

--
  Eric Deplagne



Reply via email to