shell 数组备忘
来源:互联网 发布:网络舆情培训 编辑:程序博客网 时间:2024/06/05 07:46
数组分成普通数据与关联数组
普通数组只能够使用整数下表, 不支持多维数组
关联数组需特殊定义, 允许使用英文下标
array=(1 2 3 4 5 ) 普通数组定义
declare -A new_array
new_array=([apple]=red [peach]=black) 关联数组定义
打印数组元素
echo ${array[*]} ${array[@]} 普通数组打印方法
echo $(!new_array[*]} $(!new_array[@]} 关联数组打印方法
- shell 数组备忘
- shell备忘
- shell中expr备忘
- Linux shell 常用命令备忘
- shell break语句备忘
- Bash shell 命令 备忘
- shell编程备忘
- shell中expr备忘
- shell脚本备忘
- shell脚本实例备忘
- Bash shell脚本备忘
- shell脚本备忘
- shell脚本备忘
- 实用Shell命令备忘
- Shell 脚本(备忘)
- shell命令备忘
- shell script学习备忘
- shell set 参数备忘
- imagecopyresampled创建缩略图模糊的问题
- linux vncserver 的安装和配置
- VC对话框显示网页的方法
- C++ Primer中智能指针的一个小疑惑,是书中的bug?
- Android 手机模拟游戏手柄(USB,C#,winio)
- shell 数组备忘
- [经典]Linux内核中ioremap映射的透彻理解
- Android 程式开发:(九)使用活动栏 —— 9.1隐藏或显示ActionBar
- WPF中Treeview绑定数据库数据
- VC++多线程编程
- 贝叶斯分类
- ubuntu 11.10 恢复模式中获取root 权限。
- C百例之一
- Oracle连接 Oracle 的OCI Driver 和 Thin Driver的区别