Back to Blog
Arnošt Havelka

SORT - Unique Lines

Sort and remove duplicates.

Start Interactive Lesson
SORT - Unique Lines

Remove duplicates while sorting your data.

The -u Flag

The -u (unique) flag tells sort to suppress all but one in each set of lines that sort equally.

Try the command

Filter out duplicates!

Build the command
sort-u
-uUnique sort - remove duplicates
Terminal
C:\Users\User>sort -u

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Process Guard Drill

Filter and manage processes.