-1

I have a plain text file with words, which are separated by comma, for example:

word1, word2, word3, word2, word4, word5, word 3, word6, word7, word3

i want to delete the duplicates and to become:

word1, word2, word3, word4, word5, word6, word7

There is a realy good article for Linux already So i installed gnuwin .... an gave up after a 1 h ....

Community
  • 1
  • 1
ozz
  • 175
  • 1
  • 11

1 Answers1

0
  1. Put the words on different lines in your file, say, f1.txt. You may refer to How to replace a character by a newline in Vim? for this.
  2. Then execute command "sort -u f1.text > f2.txt"
  3. Combine the words of f2.txt into a line or lines if required.
Community
  • 1
  • 1
mvsagar
  • 1,998
  • 2
  • 17
  • 19