Removing Duplicate PATH Entries

Posted by bob on Nov 10, 2018 1:32 AM EDT
Linux Journal; By Mitch Frazier
Mail this story
Print this story

The goal here is to remove duplicate entries from the PATH variable. But before I begin, let's be clear: there's no compelling reason to to do this. The shell will, in essence, ignore duplicates PATH entries; only the first occurrence of any one path is important. Two motivations drive this exercise. The first is to look at an awk one-liner that initially doesn't really appear to do much at all. The second is to feed the needs of those who are annoyed by such things as having duplicate PATH entries.

Full Story

  Nav
» Read more about: Story Type: News Story; Groups: Community, Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.