linux – Bash“declare -A”在macOS上不起作用
发布时间:2020-12-13 19:50:41 所属栏目:Linux 来源:网络整理
导读:我猜是 Bash没有在macOS上更新.当谷歌搜索更新Bash macOS时,我不断收到错误修复补丁.无论如何,我需要在macOS Bash中使用关联数组,其中命令: declare -A 产生错误: -bash: declare: -A: invalid option declare: usage: declare [-afFirtx] [-p] [name[=val
我猜是
Bash没有在macOS上更新.当谷歌搜索更新Bash macOS时,我不断收到错误修复补丁.无论如何,我需要在macOS Bash中使用关联数组,其中命令:
declare -A 产生错误:
我有优胜美地. 解决方法
declare -A(关联数组)是bash 4的一个特性.
OS X bash很可能是3.X. 我不知道OS X有关于bash 4的官方更新. BREW /等.可能会. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |