1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Merge pull request #407 from ipofss/patch-4

feat:加入提示语
This commit is contained in:
SnailClimb 2019-07-25 22:10:25 +08:00 committed by GitHub
commit 526a0c4053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,7 @@ echo $length #输出5
echo $length2 #输出5 echo $length2 #输出5
# 输出数组第三个元素 # 输出数组第三个元素
echo ${array[2]} #输出3 echo ${array[2]} #输出3
unset array[1]# 删除下为1的元素也就是删除第二个元素 unset array[1]# 删除下为1的元素也就是删除第二个元素
for i in ${array[@]};do echo $i ;done # 遍历数组,输出: 1 3 4 5 for i in ${array[@]};do echo $i ;done # 遍历数组,输出: 1 3 4 5
unset arr_number; # 删除数组中的所有元素 unset arr_number; # 删除数组中的所有元素
for i in ${array[@]};do echo $i ;done # 遍历数组,数组元素为空,没有任何输出内容 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) ![算数运算符](http://my-blog-to-use.oss-cn-beijing.aliyuncs.com/18-11-22/4937342.jpg)
我以加法运算符做一个简单的示例: 我以加法运算符做一个简单的示例(注意:不是单引号,是反引号)
```shell ```shell
#!/bin/bash #!/bin/bash