test.sh:
#!/bin/sh #定义函数 function fun1() { echo $1 # $1表示第一个参数 echo $2 } # 调用 fun1 hello shuoeasy.com
输出:
[root@localhost shell]# ./test.sh hello shuoeasy.com
阅读: 20159
阅读: 17302 评论:1
阅读: 16501
阅读: 16470
阅读: 15841
阅读: 15610
扫扫关注微信