Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #195152
| From | Abdullah Ramazanoglu <ar018@yahoo.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: List words separated by comma and without duplicates |
| Date | 2018-04-29 20:40 +0200 |
| Message-ID | <vJZoR-kT-1@gated-at.bofh.it> (permalink) |
| References | <vJYCt-8cM-5@gated-at.bofh.it> <vJZfc-hl-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, 29 Apr 2018 19:24:12 +0100 Antonio A. Rendina said: > cat list-file | uniq | sed s/$/,/ | tr '\n' ' ' But uniq eliminates consecutive (neighboring) duplicates only. If, for example, "Eduardo De Filippo" also occurs at 2nd line, then there would still be 2 separate Eduardo's left. So, sort + uniq is necessary as in, sort list-file | uniq | sed s/$/,/ | tr '\n' ' ' or you can combine them into one (as tomas already suggested) sort -u list-file | sed s/$/,/ | tr '\n' ' ' Regards -- Abdullah Ramazanoglu
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
List words separated by comma and without duplicates Rodolfo Medina <rodolfo.medina@gmail.com> - 2018-04-29 19:50 +0200
Re: List words separated by comma and without duplicates rhkramer@gmail.com - 2018-04-29 20:00 +0200
Re: List words separated by comma and without duplicates "Antonio A. Rendina" <arendina13@gmail.com> - 2018-04-29 20:20 +0200
Re: List words separated by comma and without duplicates David Margerison <deltam@electrosonics.com.au> - 2018-04-30 01:40 +0200
Re: List words separated by comma and without duplicates Bob McGowan <ramjr0915@gmail.com> - 2018-05-01 05:50 +0200
Re: List words separated by comma and without duplicates "Antonio A. Rendina" <arendina13@gmail.com> - 2018-04-29 20:30 +0200
Re: List words separated by comma and without duplicates Abdullah Ramazanoglu <ar018@yahoo.com> - 2018-04-29 20:40 +0200
Re: List words separated by comma and without duplicates <tomas@tuxteam.de> - 2018-04-29 20:30 +0200
Re: List words separated by comma and without duplicates Curt <curty@free.fr> - 2018-04-29 22:20 +0200
Re: List words separated by comma and without duplicates <tomas@tuxteam.de> - 2018-04-29 22:40 +0200
Re: List words separated by comma and without duplicates Gene Heskett <gheskett@shentel.net> - 2018-04-30 00:30 +0200
[OT - long running shows] Re: List words separated by comma and without duplicates Richard Hector <richard@walnut.gen.nz> - 2018-04-30 02:30 +0200
Re: [OT - long running shows] Re: List words separated by comma and without duplicates Gene Heskett <gheskett@shentel.net> - 2018-04-30 03:00 +0200
Re: [OT - long running shows] Re: List words separated by comma and without duplicates Richard Hector <richard@walnut.gen.nz> - 2018-04-30 03:30 +0200
Re: [OT - long running shows] Re: List words separated by comma and without duplicates Gene Heskett <gheskett@shentel.net> - 2018-04-30 05:00 +0200
Re: List words separated by comma and without duplicates Rodolfo Medina <rodolfo.medina@gmail.com> - 2018-05-18 21:00 +0200
Re: List words separated by comma and without duplicates <tomas@tuxteam.de> - 2018-05-18 21:20 +0200
csiph-web