“Bash usuń zduplikowane linie z pliku” Kod odpowiedzi

Bash usuń zduplikowane linie z pliku

# Basic syntax:
sort input_file | uniq --unique
# Sort the file first because uniq requires a sorted file to work. Uniq
# then eliminates all duplicated lines in the file, keeping one instance
# of each duplicated line

# Note, this doesn't return only non-duplicated lines. It returns
# unique instances of all lines, whether or not they are duplicated

# Note, if you want to return only one instance of all lines but see
# the number of repetitions for each line, run:
sort input_file | uniq -c
Charles-Alexandre Roy

Usuwanie duplikatu wejścia z pliku w wierszu poleceń

sort -u .txt
Sparkling Gal

Odpowiedzi podobne do “Bash usuń zduplikowane linie z pliku”

Pytania podobne do “Bash usuń zduplikowane linie z pliku”

Więcej pokrewnych odpowiedzi na “Bash usuń zduplikowane linie z pliku” w Shell/Bash

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu