From 229377c6866e288d5532f1f98f5e7323f6855bfe Mon Sep 17 00:00:00 2001 From: ipofss <274694451@qq.com> Date: Wed, 24 Jul 2019 15:37:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/operating-system/Shell.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/operating-system/Shell.md b/docs/operating-system/Shell.md index 7ed6aad4..e58f5c40 100644 --- a/docs/operating-system/Shell.md +++ b/docs/operating-system/Shell.md @@ -260,7 +260,7 @@ echo $length #输出:5 echo $length2 #输出:5 # 输出数组第三个元素 echo ${array[2]} #输出:3 -unset array[1]# 删除下表为1的元素也就是删除第二个元素 +unset array[1]# 删除下标为1的元素也就是删除第二个元素 for i in ${array[@]};do echo $i ;done # 遍历数组,输出: 1 3 4 5 unset arr_number; # 删除数组中的所有元素 for i in ${array[@]};do echo $i ;done # 遍历数组,数组元素为空,没有任何输出内容 @@ -283,7 +283,7 @@ for i in ${array[@]};do echo $i ;done # 遍历数组,数组元素为空,没 ![算数运算符](http://my-blog-to-use.oss-cn-beijing.aliyuncs.com/18-11-22/4937342.jpg) -我以加法运算符做一个简单的示例: +我以加法运算符做一个简单的示例(注意:不是单引号,是反引号): ```shell #!/bin/bash