From c59e84c66d818e6b01e7b0332c00645f5a88b780 Mon Sep 17 00:00:00 2001 From: Pavel Rehak Date: Sun, 20 May 2018 16:14:16 +0200 Subject: [PATCH] length=${#FUNCNAME/#cfg_section_;[*]}: bad substitution - solution --- bash-ini-parser | 1 + 1 file changed, 1 insertion(+) diff --git a/bash-ini-parser b/bash-ini-parser index 23384e0..daa98bc 100755 --- a/bash-ini-parser +++ b/bash-ini-parser @@ -92,6 +92,7 @@ function cfg_writer { item="$(declare -f ${f})" item="${item##*\{}" # remove function definition item="${item##*FUNCNAME*$PREFIX\};}" # remove clear section + item="${item/FUNCNAME\/#$PREFIX;}" # remove line item="${item/\}}" # remove function close item="${item%)*}" # remove everything after parenthesis item="${item});" # add close parenthesis