Results for “duplicate lines”
Small, practical examples. Search by task or narrow things down below.
Report duplicate business values and their frequency
SQL Server: Group by a candidate business key and retain only groups with multiple rows.
SQL Server✓ Tested
Report duplicate business values and their frequency
Postgres: Group by a candidate business key and retain only groups with multiple rows.
Postgres✓ Tested
Report duplicate business values and their frequency
SQLite: Group by a candidate business key and retain only groups with multiple rows.
SQLite✓ Tested
Set space between text lines
CSS: Learn how to set space between text lines in a complete browser example.
CSS✓ Tested
Show the first lines of a file
Read only the first three lines of a text file, useful for checking a header or previewing a large log.
head✓ Tested
Sort a small set of lines
Linux Commands: Sort a small set of lines using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Sort and deduplicate values
Sort a C++ vector and erase adjacent duplicates.
C++✓ Tested
Sort lines by numeric value
Linux Commands: Use sort -n so 10 sorts after 2 instead of before it.
Linux Commands✓ Tested
Summarize added and removed lines numerically
Git: Numstat provides tab-separated counts suitable for processing.
Git✓ Tested
Trim and discard blank lines
JavaScript: Split a text block, trim each line, and keep nonempty values.
JavaScript✓ Tested
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested