bash - Bash 5 - 未找到 mapfile / readarray 命令
问题描述
我在 MacOS Cagalina 10.15.4 上。我认为 mapfile 和 readarray 可用于 Bash 4 及更高版本,但低于。请问我做错了什么?
$ brew install bash
$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-apple-darwin19.4.0)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
$ mapfile
-bash: mapfile: command not found
$ readarray
-bash: readarray: command not found
解决方案
推荐阅读
- php - 使用 unlink() 和 rmdir() 的 PHP 函数不起作用
- c - 这段代码对应的矩阵/向量运算是什么?
- javascript - 如何在javascript中的对象数组中填充字符串模板变量?
- c# - 值被重置为零
- lombok - Lombok @Builder 不适用于实体类中字段的自定义实现
- mysql - 折叠 m:n 关系到 mysql 中的两个 1:n 关系
- java - SwingUtilities.updateComponentTreeUI() 不改变 JFrames 标题栏
- javascript - 用新值替换 localStorage
- javascript - 为什么我使用 Deferred 的 jQuery 对话框不等待用户选择?
- search - 过滤表上的表搜索?