Re: remove doublets

2021-06-14 Thread Oğuz Ersen via users
This preserves line order: $ cat file.txt dd aa bb cc bb aa $ awk '!line[$0]++' file.txt dd aa bb cc -- Best Regards, Oğuz ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedor

Re: remove doublets

2021-06-13 Thread George N. White III
On Sun, 13 Jun 2021 at 06:51, Patrick Dupre wrote: > Hello, > > I wish to remove lines which appear twice in a file, actually > only when they appear more than one time. > How can I do so? > Do you need to keep the lines in the same order? If not, then "sort -u" should work. You may also want

remove doublets

2021-06-13 Thread Patrick Dupre
Hello, I wish to remove lines which appear twice in a file, actually only when they appear more than one time. How can I do so? Thanks === Patrick DUPRÉ | | email: pdu...@gmx.com Laboratoire