diff --git a/lib/ulib/conf b/lib/ulib/conf index 98c123c..d733fc1 100644 --- a/lib/ulib/conf +++ b/lib/ulib/conf @@ -399,9 +399,9 @@ function write_unseen(write_section, wrote_section) { splitvar "$param" name value script="$script in_section && \$0 ~ /^[ $TAB]*((##*|;;*)[ $TAB]*)?$name[ $TAB]*=/ { - \$0 = gensub(/^[ $TAB]*(##*|;;*)[ $TAB]*($name[ $TAB]*=)/, \"\\\\2\", \"\") + \$0 = gensub(/^[ $TAB]*(##*|;;*)[ $TAB]*($name[ $TAB]*=)/, \"\\\\2\", 1) if (hasvalues[$i]) { - \$0 = gensub(/^([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\1\" values[$i], \"\") + \$0 = gensub(/^([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\1\" values[$i], 1) } seen[$i] = 1 modified = 0 diff --git a/lib/ulib/udir b/lib/ulib/udir index 7e57927..e8cc465 100644 --- a/lib/ulib/udir +++ b/lib/ulib/udir @@ -169,7 +169,7 @@ function write_unseen() { name="${param%%=*}" script="$script \$0 ~ /^[ $TAB]*(##*[ $TAB]*)?$name[ $TAB]*=/ { - \$0 = gensub(/^([ $TAB]*##*)?([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\2\" values[$i], \"\") + \$0 = gensub(/^([ $TAB]*##*)?([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\2\" values[$i], 1) seen[$i] = 1 }" let i=$i+1