uniq
Programm: uniq
Fasst gleiche Zeilen hintereinander zusammen.
Aufruf
uniq [OPTION]... [INPUT [OUTPUT]]
Beschreibung
Print the lines of INPUT, but equal lines that follow each other only once. Without INPUT, or with -, read the keyboard or pipe.
Optionen im Simulator
6 weitere Optionen des echten Programms, im Simulator noch nicht
Beispiele
sort notizen.txt Dokumente/notizen.txt | uniq -c
1 Blumen gießen
2 Milch kaufen
1 Zahnarzt anrufen uniq -c besucher.txt
1 10.0.0.5
1 10.0.0.9
2 10.0.0.5
1 10.0.0.7
1 10.0.0.9
1 10.0.0.5
1 10.0.0.9
sort besucher.txt | uniq -c
4 10.0.0.5
1 10.0.0.7
3 10.0.0.9 sort besucher.txt | uniq -c | sort -rn
3 anna
2 ben
1 carla Wo du ihn lernst
Lektionen
- Befehle verketten Terminal-Start
- Sortieren und zählen Linux-Grundlagen, Modul 3: Text-Werkzeuge