Skip to content
zero2vibecodelearn vibe coding

What sort | uniq does

Sort the lines and drop the repeats.

sortnames.txt|uniq
  • sortcommand — sort lines
  • names.txtargument: a file, a folder, or text
  • |pipe: the previous command's output becomes the next one's input
  • uniqcommand — drop repeated neighboring lines

What it does when you run it

$ sort names.txt | uniq

adam
bo
vera

Run it yourself

The same files. Nothing here can break, and nothing leaves your browser.

Explain other commands

Written by Mikhail Kuzmitskii