“Bash doppelte Zeilen aus einer Datei entfernen” Code-Antworten

Bash doppelte Zeilen aus einer Datei entfernen

# 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

Entfernen Sie die doppelte Eingabe aus einer Datei in der Befehlszeile

sort -u .txt
Sparkling Gal

Ähnliche Antworten wie “Bash doppelte Zeilen aus einer Datei entfernen”

Fragen ähnlich wie “Bash doppelte Zeilen aus einer Datei entfernen”

Weitere verwandte Antworten zu “Bash doppelte Zeilen aus einer Datei entfernen” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen