1
0
mirror of https://github.com/albfan/bash-ini-parser.git synced 2025-04-19 13:22:14 +03:00

clear function

This commit is contained in:
albfan 2015-05-16 20:36:17 +02:00
parent affa300da5
commit a635d175ce

View File

@ -94,6 +94,18 @@ function cfg_writer {
IFS="$OLDIFS"
}
function cfg_clear {
OLDIFS="$IFS"
IFS=' '$'\n'
fun="$(declare -F)"
fun="${fun//declare -f/}"
for f in $fun; do
[ "${f#$PREFIX}" == "${f}" ] && continue
unset -f ${f}
done
IFS="$OLDIFS"
}
function cfg_update {
SECTION=$1
VAR=$2