Aadd LWS to PATH

remove duplicates from PATH
This commit is contained in:
Martin Blazik
2022-01-18 07:39:34 +01:00
parent b39fee5953
commit 924718fe27
2 changed files with 6 additions and 4 deletions

View File

@@ -31,4 +31,6 @@ function prepend_path() {
fi
}
function uniq_path() {
echo "$PATH" | tr ":" "\n" | awk '!seen[$0]++' | tr "\n" ":" | sed -r 's/:+/:/g' | sed -r 's/^:|:$//g'
}