Created
May 12, 2017 17:43
-
-
Save eiro/8484f9eba54f96ce092f81efc446c3d7 to your computer and use it in GitHub Desktop.
weird mksh local array ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# i use MIRBSD KSH R54 2016/11/11 | |
# i don't understand why if i uncomment this line | |
# set -u | |
# i get this message | |
# outch.ksh[21]: _m4a[@]: parameter not set | |
# as it seems _m4 works | |
_mma () { | |
local _m4 _m4a _key _value | |
_m4a=( "$@" ) | |
_m4=( ) | |
for _key in $import; do | |
nameref _value=$_key | |
_m4+=( "-D$_key=$_value" ) | |
done | |
m4 "${_m4[@]}" "${_m4a[@]}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment