Re: List words separated by comma and without duplicates

2018-05-18 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, May 18, 2018 at 08:50:48PM +0200, Rodolfo Medina wrote: [...] > Thanks to all who helped. I adopted Tomas' solution: Hey, glad you liked it :-) Cheers - -- t -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlr

Re: List words separated by comma and without duplicates

2018-05-18 Thread Rodolfo Medina
Rodolfo Medina writes: > Suppose I have a file made by a list of names and surnames, e.g.: > > Arvo Part > Harold Pinter > Lucio Battisti > Antonio Amurri > Eduardo De Filippo > Eduardo De Filippo > > and that I want them listed all on one line, separated by a comma and without > duplicates, i.e.

Re: List words separated by comma and without duplicates

2018-04-30 Thread Bob McGowan
On 04/29/2018 03:45 PM, David Margerison wrote: On 30 April 2018 at 04:12, Antonio A. Rendina wrote: If you want to improve your bash skills you can read: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/ I suggest that to avoid poor and ancient, it would be better to read current documents w

Re: [OT - long running shows] Re: List words separated by comma and without duplicates

2018-04-29 Thread Gene Heskett
On Sunday 29 April 2018 21:28:56 Richard Hector wrote: > On 30/04/18 12:56, Gene Heskett wrote: > > On Sunday 29 April 2018 20:27:56 Richard Hector wrote: > >> On 30/04/18 10:29, Gene Heskett wrote: > >>> The Simpsons, who just passed Gunsmoke as the longest running > >>> program ever. > >> > >> I

Re: [OT - long running shows] Re: List words separated by comma and without duplicates

2018-04-29 Thread Richard Hector
On 30/04/18 12:56, Gene Heskett wrote: > On Sunday 29 April 2018 20:27:56 Richard Hector wrote: > >> On 30/04/18 10:29, Gene Heskett wrote: >>> The Simpsons, who just passed Gunsmoke as the longest running >>> program ever. >> >> I can't figure out what criteria are required to make that work. >>

Re: [OT - long running shows] Re: List words separated by comma and without duplicates

2018-04-29 Thread Gene Heskett
On Sunday 29 April 2018 20:27:56 Richard Hector wrote: > On 30/04/18 10:29, Gene Heskett wrote: > > The Simpsons, who just passed Gunsmoke as the longest running > > program ever. > > I can't figure out what criteria are required to make that work. > > Richard Number of episodes aired. Gunsmoke r

[OT - long running shows] Re: List words separated by comma and without duplicates

2018-04-29 Thread Richard Hector
On 30/04/18 10:29, Gene Heskett wrote: > The Simpsons, who just passed Gunsmoke as the longest running program ever. I can't figure out what criteria are required to make that work. Richard signature.asc Description: OpenPGP digital signature

Re: List words separated by comma and without duplicates

2018-04-29 Thread David Margerison
On 30 April 2018 at 04:12, Antonio A. Rendina wrote: > > If you want to improve your bash skills you can read: > http://www.tldp.org/LDP/Bash-Beginners-Guide/html/ I suggest that to avoid poor and ancient, it would be better to read current documents written by active experts. http://mywiki.wool

Re: List words separated by comma and without duplicates

2018-04-29 Thread Gene Heskett
On Sunday 29 April 2018 16:34:18 to...@tuxteam.de wrote: > On Sun, Apr 29, 2018 at 08:06:47PM +, Curt wrote: > > [...] > > > Not knowing anything I came up with (after some research): > > > > sort -u < test.txt | tr '\n' ',' > > > > No sed. > > If you don't need the space after the comma then

Re: List words separated by comma and without duplicates

2018-04-29 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Apr 29, 2018 at 08:06:47PM +, Curt wrote: [...] > Not knowing anything I came up with (after some research): > > sort -u < test.txt | tr '\n' ',' > > No sed. If you don't need the space after the comma then yes, sed is superfluous. R

Re: List words separated by comma and without duplicates

2018-04-29 Thread Curt
On 2018-04-29, wrote: > >> >> How can I do that with proper Unix commands? > > The "classical": > > tomas@trotzki:/tmp$ cat foo > Arvo Part > Harold Pinter > Lucio Battisti > Antonio Amurri > Eduardo De Filippo > Eduardo De Filippo > > tomas@trotzki:/tmp$ sort -u < foo | sed -e 's/

Re: List words separated by comma and without duplicates

2018-04-29 Thread Antonio A. Rendina
On Sun, 2018-04-29 at 19:43 +0200, Rodolfo Medina wrote: > Hi all. > > Suppose I have a file made by a list of names and surnames, e.g.: > > Arvo Part > Harold Pinter > Lucio Battisti > Antonio Amurri > Eduardo De Filippo > Eduardo De Filippo > > and that I want them listed all on one line, sepa

Re: List words separated by comma and without duplicates

2018-04-29 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Apr 29, 2018 at 07:43:34PM +0200, Rodolfo Medina wrote: > Hi all. > > Suppose I have a file made by a list of names and surnames, e.g.: > > Arvo Part > Harold Pinter > Lucio Battisti > Antonio Amurri > Eduardo De Filippo > Eduardo De Filippo

Re: List words separated by comma and without duplicates

2018-04-29 Thread Antonio A. Rendina
On Sun, 2018-04-29 at 19:43 +0200, Rodolfo Medina wrote: > Hi all. > > Suppose I have a file made by a list of names and surnames, e.g.: > > Arvo Part > Harold Pinter > Lucio Battisti > Antonio Amurri > Eduardo De Filippo > Eduardo De Filippo > > and that I want them listed all on one line, sepa

Re: List words separated by comma and without duplicates

2018-04-29 Thread rhkramer
Is this a homework assignment? How many names are in the list? On Sunday, April 29, 2018 01:43:34 PM Rodolfo Medina wrote: > Suppose I have a file made by a list of names and surnames, e.g.: > > Arvo Part > Harold Pinter > Lucio Battisti > Antonio Amurri > Eduardo De Filippo > Eduardo De Filippo

List words separated by comma and without duplicates

2018-04-29 Thread Rodolfo Medina
Hi all. Suppose I have a file made by a list of names and surnames, e.g.: Arvo Part Harold Pinter Lucio Battisti Antonio Amurri Eduardo De Filippo Eduardo De Filippo and that I want them listed all on one line, separated by a comma and without duplicates, i.e.: Arvo Part, Harold Pinter, Lucio B