I'm working on diffing some ldif files where each section begins with "dn: leaf,branch3,branch2,branch1,root" I would like the dn (distinguished name) for each section to be displayed, and the Unix diff utility has a feature to do that: --show-function-line=regular expression. However, the diff util truncates the dn line in the output, which makes it harder to know the full path.
current command:
diff -U 0 --show-function-line="^dn\: .*" file1.ldif file2.ldif > deltas.txt
example output:
@@ -56 +56 @@ dn: administratorId=0,applicationName=pl
-previousLoginTime: 20120619180751Z
+previousLoginTime: 20120213173659Z
original dn:
dn: administratorId=0,applicationName=platform,nodeName=NODENAME
I would like the entire original line to be included in the output. Is there a way to do this?
Thanks, Rusty