Delete duplicate lines in a file after a match in a particular subset of columns <p>I've an unsorted file, containing row data disposed in many columns, as in this example:</p> <pre><code>10:23:55.521803 [INFO] eceb [ 41] 235 870 1 26601 349 910 10:24:11.771454 [INFO] eceb [ 41] 41 870 0 26601 349 910 10:25:18.858675 [INFO] eceb [ 41] 235 870 3 26601 349 910 10:25:18.814763 [INFO] eceb [ 41] 60 1247 0 38490 163 715 10:25:19.844738 [INFO] eceb [ 41] 60 1248 0 38490 163 715 10:24:11.771454 [INFO] eceb [ 41] 41 870 0 26641 389 920 </code></pre> <p>I want to identify all the lines that, considering only the columns 4,5 and 6, are the same, and delete all this lines from the file.</p> <p>Therefore, the result should be, in this example:</p> <pre><code>10:25:18.814763 [INFO] eceb [ 41] 60 1247 0 38490 163 715 10:25:19.844738 [INFO] eceb [ 41] 60 1248 0 38490 163 715 </code></pre> <p>How can I do this?</p>