0

There is any Linux command that deletes duplicates of lines in a file but not the first appearance of the line that is duplicate.

For example, we have a file that has the following lines:

Test Line
Another line
Test
4th line
Test
Test Line 

And I want after I run the command, the lines that should remain in the file are:

Test Line
Another Line
Test
4th line 
P....
  • 17,421
  • 2
  • 32
  • 52
Robert Gutu
  • 99
  • 1
  • 10

0 Answers0