shellScript之数组操作7
来源:互联网 发布:excel数据透视表作用 编辑:程序博客网 时间:2024/06/07 18:12
#!/bin/bashcity=(beijing nanjing shanghai)person=(cai [5]=wuTang)declare -a combinecombine=(${city[@]} ${person[@]})count=${#combine[@]}index=0while [ "$index" -lt "$count" ]do echo "Element[$index]=${combine[$index]}" let "index=$index+1"doneechounset combinecombine[0]=${city[@]}combine[1]=${person[@]}count=${#combine[@]}index=0while [ "$index" -lt "$count" ] do echo "Element[$index]=${combine[$index]}" let "index=$index+1"doneecho 结果:~/script/shell_text $ ./12array.sh Element[0]=beijingElement[1]=nanjingElement[2]=shanghaiElement[3]=caiElement[4]=wuTangElement[0]=beijing nanjing shanghaiElement[1]=cai wuTang
阅读全文
0 0
- shellScript之数组操作7
- shellScript之数组操作1
- shellScript之数组操作2
- shellScript之数组操作3
- shellScript之数组操作4
- shellScript之数组操作5
- shellScript之数组操作6
- shellScript之位置参数
- shellScript之if_else语句
- shellScript之if_elif_else语句
- shellScript之case语句
- shellScript之for语句
- shellScript之while语句
- shellScript之while语句
- shellScript之util语句
- shellScript之break关键字
- shellScript之continue语句
- shellScript之select语句
- 微信公众号开发 配置服务器URL,验证Token
- 如何将公式中的参数转化成数字
- linux 等待队列
- Linux Kernel gpio export功能
- 字符个数统计(C/C++)
- shellScript之数组操作7
- spring cloud初学者--使用数据库
- 使用dom4j对xml文件进行增、删、改、查
- python-密码登陆脚本
- libmodbus实现modbus poll功能
- eclipse CTRL+H默认打开文件搜索
- mac电脑忘记密码问题解决
- Java+Selenium3方法篇30-Selenium中截图方法-TakeScreenshot
- python运行第一个.py程序