Skip to main content
2 of 4
Descriptive title, tags & formatting
jasonwryan
  • 74.8k
  • 35
  • 204
  • 230

Remove duplicate $PATH entries with awk command

I am trying to write a bash shell function that will allow me to remove duplicate copies of directories from my path environment.

I was told that it is possible to achieve this with a one line command using the awk command, but I cannot figure out how to do it. Anybody know how? I am new to linux so please don't be too technical.