ve3wwg / upath

Cleanup PATH / other environment variable - removing duplicates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upath

Version 1.0

 Usage: upath [-options] [envname..]
  --help | -h        Help info.
  --version | -V     Version info.

By default, environment variable PATH is assumed:

What it Does

upath examines your environment variable, noting the order of the colon separated components. It then emits the components with the same ordering, but with duplicate directories eliminated.

After adding a directory to PATH for example, you can eliminate duplicates by doing:

PATH=$(upath)

Or for a different variable LD_LIBRARY_PATH:

LD_LIBRARY_PATH=$(upath LD_LIBRARY_PATH)

Installation

  1. git clone https://github.com/ve3wwg/upath.git
  2. cd ./upath
  3. make
  4. sudo cp upath /usr/local/bin/upath

About

Cleanup PATH / other environment variable - removing duplicates


Languages

Language:C++ 91.6%Language:Makefile 8.4%