>_devtools

Remove Duplicate Lines

Remove repeated lines from a list, ignoring case or whitespace if you want, keeping the first or last copy.

What this does

Removes repeated lines from a list and keeps the rest in their original order. Unlike the Unixuniq command, duplicates do not need to be next to each other, so there is no need to sort first.

Options

  • Ignore case: treat Apple and apple as the same line.
  • Ignore surrounding whitespace: treat apple andapple as the same line. The kept copy is left exactly as written.
  • Keep first or last copy: decides which of the duplicates survives, and where it sits in the output.
  • Output: each line once (the default), only the lines that appear more than once, or only the lines that appear exactly once.

Example

a, b, a, c, b becomes a, b, c. Choosing “Only lines that repeat” givesa, b, and “Only lines that never repeat” gives c. The status line under the editors tells you how many lines were removed.

Privacy

This runs entirely in your browser. Nothing is uploaded.