![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
funrain
这个作者很懒,什么都没留下…
展开
-
SHELL编程递归实现求阶乘
#!/bin/bash#递归求阶乘#set -x #跟踪脚本的执行过程#输入参数检测if [ "$1" = "" ]then echo "usage:`basename $0` [number]" exitfiif echo $1|grep '[[:digit:]]' 1>/dev/nullthen if [ $1 -lt 0 ] then原创 2012-08-01 19:25:23 · 6388 阅读 · 0 评论 -
Shell编程简单实现四则运算
#!/bin/shmain(){ echo "#############################" echo "## usage: num1 +/-/#// num2##" echo "## example: 1 + 1 ##" echo "## '*' is replaced by '#' #原创 2012-07-20 18:48:06 · 3239 阅读 · 0 评论