1
、编写函数,实现打印绿色
OK
和红色
FAILED
判断是否有参数,存在为
Ok
,不存在为
FAILED
![](https://i-blog.csdnimg.cn/blog_migrate/65c89292b52d916073ee941ecf8dc473.png)
2
、编写函数,实现判断是否无位置参数,如无参数,提示错误
![](https://i-blog.csdnimg.cn/blog_migrate/7ac48d423f65d7a67f2702236923d36c.png)
3
、编写函数实现两个数字做为参数,返回最大值
![](https://i-blog.csdnimg.cn/blog_migrate/a97a7b324a7d4ceba6a2582e6cb33c92.png)
4
、编写函数,实现两个整数位参数,计算加减乘除。
![](https://i-blog.csdnimg.cn/blog_migrate/aa1406a85d61884f688154206f2ebf96.png)
5
、将
/etc/shadow
文件的每一行作为元数赋值给数组
![](https://i-blog.csdnimg.cn/blog_migrate/8d94d1814ab450d1a93747b6b05c9f28.png)
6
、使用关联数组统计文件
/etc/passwd
中用户使用的不同类型
shell
的数量
![](https://i-blog.csdnimg.cn/blog_migrate/c1cb34600d3dc43c986ef2ac06f9c1f0.png)
7
、使用关联数组按扩展名统计指定目录中文件的数量
![](https://i-blog.csdnimg.cn/blog_migrate/fa49e71b19ab9b23a7514e07080a5bf3.png)