1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#!/bin/sh #函数要定义在使用之前 function lession(){ echo "this is a function" } lession function lession2(){ echo "this is lession2" echo "The first is $1" echo "The first is $2" } lession2 1 2 function lession3(){ echo "this is lession3" sum=0; let "sum=$1+$2" return $sum; } lession3 1 2 echo "1+2=$?" #注意,aix中好像不能用() |
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021