dotfiles/a/bin/consolidate-path
2022-08-24 04:07:33 -04:00

12 lines
151 B
Bash
Executable file

#!/bin/bash
result=":"
IFS=:
for p in $1; do
[[ "$result" == *:"$p":* ]] || result="${result}${p}:"
done
result="${result#:}"
echo "${result%:}"