Linux Shell函数返回值

Shell函数返回值,通常有3种方式:return,argv,echojavascript 1) return 语句 shell函数的返回值,能够和其余语言的返回值同样,经过return语句返回。 示例: #!/bin/bash - function mytest() { echo "arg1 = $1" if [ $1 = "1" ] ;then return 1
相关文章
相关标签/搜索