12 lines
151 B
Bash
Executable file
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%:}"
|