Answer the question
In order to leave comments, you need to log in
How to remove duplicate words before delimiter?
There is a large text file that is divided | - need from | to symbol | remove duplicate words. Since these words can be repeated throughout the text, and I only need that there are no duplicate words from | before |
Either massively 1000 text files to remove duplicate words.
How and with what can this be done? More details please.
Answer the question
In order to leave comments, you need to log in
powershell
cmdlets (what I remembered in a hurry): $v=Get-Content имяфайла -raw
pushes the entire contents of the file into a variable as a string
or
splits the string $v into an array of space-separated elements (words)
outputs only unique (non-repeating) values of the array of words into the $c array
outputs everything line by line to a text file words of array $c (removed duplicates)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question