shell --- 相关简单程序规整
1、1-100 数字 求和①非递归方式
//shell
//运行结果:
②递归方式
//shell
//运行结果:
2、进度条
//shell
//运行结果:
3、读取文件中多个数字,求取 max、min、avg.
//shell
//运行结果:
4、字符串截取 【相关:http://zxtong.blog.51cto.com/10697148/1790030】
(1)使用命令:“##”“#”“%%”“%”等
(2)利用 cut 工具:
//shell
//运行结果:
5、斐波那契数列
①非递归方式
//shell
//运行结果:
②递归方式
//shell
//运行结果:
总结:
shell 程序编写,自我感觉程序较为简单,但程序的格式等极易出错,因而需要多加练习,熟悉各种格式。
页:
[1]