Ich habe die folgenden Dateien:Warum funktioniert das Vergleichen von Zeilen nicht wie erwartet?
file1.txt
###################################################
Dump stat Title information for 'ssummary' view
###################################################
Tab=> 'Instance' Title=> {text {Total instances: 7831}}
Tab=> 'Device' Title=> {text {Total spice devices: 256}}
Tab=> 'Memory' Title=> {text {Total memory allocated: 962192 kB}}
Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 9030 ms}}
file2.txt
###################################################
Dump stat Title information for 'ssummary' view
###################################################
Tab=> 'Instance' Title=> {text {Total instances: 7831}}
Tab=> 'Device' Title=> {text {Total spice devices: 256}}
Tab=> 'Memory' Title=> {text {Total memory allocated: 9621932 kB}}
Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 90303 ms}}
Und ich bin den folgenden Befehl ausführen:
diff -I 'Memory' file1.txt file2.txt
die Ausgänge :
6,7c6,7
< Tab=> 'Memory' Title=> {text {Total memory allocated: 962192 kB}}
< Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 9030 ms}}
---
> Tab=> 'Memory' Title=> {text {Total memory allocated: 9621932 kB}}
> Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 90303 ms}}
jedoch meine erwartete Ausgabe ist:
< Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 9030 ms}}
---
> Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 90303 ms}}
Beachten Sie, dass in dem Befehl, wenn ich ‚Memory‘ auf ‚Tab‘ oder ‚Titel‘ Problem ist gelöst ändern, aber wahrscheinlich alle Zeilen ignoriert werden, weil sie alle haben Tab und Titel.
Was ist Ihre erwartete Ausgabe? – fedorqui