diff options
-rw-r--r-- | research/research5.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/research/research5.sh b/research/research5.sh index 90e475f..77a126d 100644 --- a/research/research5.sh +++ b/research/research5.sh @@ -48,8 +48,8 @@ __fn_ctxsw() ?*) # Unset static variables and functions from previous TU. eval "unset \${__${__prev_tu}_static_vars}" - for __fn in $(eval printf '%s' \ - "\"\${__${__prev_tu}_static_fns}\""); do + eval "__val=\${__${__prev_tu}_static_fns}" + for __fn in ${__val}; do unset -f "${__fn%:*}" done ;; esac @@ -57,10 +57,10 @@ __fn_ctxsw() ${__prev_tu});; ?*) # Set static variables and function for the current TU. - eval "$(eval "printf '%s ' \ - \${__${__fn_tu}_static_var_vals}")" - for __fn in $(eval printf '%s' \ - "\"\${__${__fn_tu}_static_fns}\""); do + eval "__val=\${__${__fn_tu}_static_var_vals}" + eval "${__val}" + eval "__val=\${__${__fn_tu}_static_fns}" + for __fn in ${__val}; do eval "${__fn%:*}() { ${__fn#*:}; }" done ;; esac |