摘要: 一.函数定义 #!/bin/sh #func1.sh hello() ##函数定义 { echo "Hello there today's date is 'date +%Y-%m-%d' " #return 2 ###返回值其实是状态码,只能在[0-255]范围内 } echo "now goin 阅读全文
posted @ 2019-09-17 23:52 引路的风筝 阅读(764) 评论(0) 推荐(0)
摘要: 一.用expr 格式expr m + n 或$((m+n)),注意expr运算符要有空格 例如(2+3)*4的值 1.分步运算 S=‘expr 2 + 3’ expr $S \* 4 ## *号需要转义 2.一步完成计算 expr 'expr 2 + 3 '\* 4 echo 'expr \'exp 阅读全文
posted @ 2019-09-17 00:16 引路的风筝 阅读(489) 评论(0) 推荐(0)