mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-01 20:46:12 +01:00
14 lines
353 B
Bash
14 lines
353 B
Bash
|
echo > config_bundle_dedup.ini
|
||
|
|
||
|
cat <(sed -e 's/^$/\xBF/' < config_bundle.ini) <(printf '\xBF') | while read -d $'\xBF' var
|
||
|
do
|
||
|
newline=$"\n"
|
||
|
header="$( cut -d $'\n' -f 1 <<< "$var" )"
|
||
|
pairs="$( cut -d $'\n' -f 2- <<< "$var" )"
|
||
|
(
|
||
|
echo "$header"
|
||
|
echo "$pairs" | sort -u -t' ' -k1,1
|
||
|
printf "\n"
|
||
|
) >> config_bundle_dedup.ini
|
||
|
done
|