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....
  • 14,772
  • 2
  • 24
  • 42

0 Answers0