문제

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 ....

도움이 되었습니까?

해결책

  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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top