• Skip to primary navigation
  • Skip to content
  • Skip to footer
Looking for data in all the right places...
  • Portfolio
  • Posts
  • Categories
  • Tags
  • About
    Francis T. O'Donovan

    Francis T. O'Donovan

    Data Scientist – Planet discoverer, researcher, developer, geek.

    • Boston, MA
    • Website
    • Email
    • Bitbucket
    • GitHub
    • Google Scholar
    • KeyBase
    • LinkedIn
    • Medium
    • ORCiD
    • ResearchGate
    • StackOverflow
    • Mastodon
    • Keyoxide

    Shell: Dedup PATH variable

    June 25, 2022 less than 1 minute read

    How to handle duplicates in your PATH variable? Use the following one liner:

    PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
    

    Via SO.

    Tags: bash, path, shell, til

    Categories: til

    Updated: May 13, 2025

    Share on

    Twitter Facebook LinkedIn
    Previous Next

    Leave a comment

    You may also enjoy

    Using Stoicism to thrive as an IC Data Scientist

    January 25, 2026 6 minute read

    For Data Scientists facing lack of control over data and outcomes, Stoicism offers a framework to thrive in one’s career. By focusing on the “Dichotomy of Co...

    Culture turns strategy into action

    January 22, 2026 2 minute read

    Like many people, I enjoy working at startups with a mission I believe in. These companies match talented individuals with the latest technologies to solve i...

    Python: How uv got so fast

    January 9, 2026 less than 1 minute read

    I love uv, the latest python dependencies manager, and use it whenever I can.

    Stoicism and the pursuit of a good life

    December 17, 2025 2 minute read

    Stoicism emphasizes focusing on the controllable aspects of our lives and accepting the uncontrollable. Applying this philosophy can help us in our pursuit o...

    • Follow:
    • Feed
    © 2026 Francis T. O'Donovan. Powered by Jekyll & Minimal Mistakes.