V
V
Vladimir2016-01-06 11:14:17
Text Processing Automation
Vladimir, 2016-01-06 11:14:17

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

1 answer(s)
E
Eugene, 2016-01-06
@vovain

powershell
cmdlets (what I remembered in a hurry):
$v=Get-Content имяфайла -rawpushes 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 question

Ask a Question

731 491 924 answers to any question