TL;DR:
- Windows 10 has an undocumented
/unique
switch forsort
- git for Windows ships with
uniq
(in a default x64 install, it is atC:\Program Files\Git\usr\bin\uniq.exe
)
From [WayBack] sorting – Is there a Windows equivalent to the Unix uniq? – Super User
This works fine:
dir /s /b *0*.pas *1*.pas *2*.pas *3*.pas *4*.pas *5*.pas *6*.pas *7*.pas*8*.pas *9*.pas | sort /unique > pas-files-with-numeric-names.txt
I need remove duplicate lines from a text file, it is simple in Linux usingcat file.txt |sort | uniqwhen file.txt containsaaabbbaaacccIt will output aaabbbcccIs there a Windows