For various reasons, the way my $PATH environment variable gets constructed results in a long, repetitive list of directories.

This is, of course, silly. For those same reasons, it's difficult to avoid constructing such a silly list, so instead I wrote a simple little program to remove duplicates.

The source code for pathdedup is at https://codeberg.org/liw/pathdedup.

Maybe it's of any use for someone else.