You've already forked bash-ini-parser
mirror of
https://github.com/albfan/bash-ini-parser.git
synced 2025-10-29 10:29:28 +03:00
Remove duplication from created ini file.
t0006
This commit is contained in:
committed by
Alberto Fanjul
parent
47dddefc36
commit
45ecd6c72e
@@ -100,9 +100,10 @@ function cfg_writer {
|
||||
while [ "$item" != "" ]
|
||||
do
|
||||
newvar="${item%%=*}" # get item name
|
||||
vars="$vars $newvar" # add name to collection
|
||||
vars="$vars$newvar" # add name to collection
|
||||
item="${item#*;}" # remove readed line
|
||||
done
|
||||
vars=$(echo "$vars" | sort -u) # remove duplication
|
||||
eval $f
|
||||
echo "[${f#$PREFIX}]" # output section
|
||||
for var in $vars; do
|
||||
|
||||
Reference in New Issue
Block a user