shell数组操作
来源:互联网 发布:火箭爵士季后赛数据 编辑:程序博客网 时间:2024/06/06 12:46
数组定义
#定义数组 array_name=(value0 value1 value2) array_name[0]=value0 array_name[1]=value1 array_name[2]=value2o array_name=( value0 value1 value2 value3 ) valuen=${array_name[2]} #获取指定元素 ${array_name[*]} #获取所有元素 ${array_name[@]} # 取得数组元素的个数 length=${#array_name[@]} length=${#array_name[*]} # 取得数组单个元素的长度 lengthn=${#array_name[n]} #遍历数组 for data in ${#array_name[@]} do echo ${data} done for ((i=0;i<${#array_name[*]};i++)) do echo ${str[i]} done
0 0
- shell的数组操作
- shell中的数组操作
- linux shell数组操作
- shell数组操作
- shell 中数组的操作
- linux shell 之数组操作
- shell数组与字符串操作
- Shell脚本数组操作小结
- Shell脚本数组操作小结
- Shell脚本数组操作小结
- bash shell 数组元素遍历操作 foreach
- Shell script - awk数组操作详细介绍
- Shell编程之数组、字符串基本操作
- shell 中数组的基本操作
- Shell中的数组及其相关操作
- shell命令之基本的数组操作
- Shell中的数组及其相关操作
- Shell中的数组及其相关操作
- LeetCode—417. Pacific Atlantic Water Flow
- 玄学曲线并不玄 教你如何看懂GPU呈现
- 编程规范积累
- 感知哈希算法实现简单图片搜索
- openssl 证书流程和概念
- shell数组操作
- R 语言学习笔记(二)
- ClassLoader 工作机制
- 多视几何:齐次坐标
- 最详细的Log4j使用教程
- Java常用集合类框架的基本接口
- 低功耗版STM8L051的一个诡异配置
- 内联函数
- spring prototype的每个对象中中创建singleton的bean