[关闭]
@xtccc 2016-11-13T02:10:38.000000Z 字数 206 阅读 1670

返回值

给我写信
GitHub

此处输入图片的描述

Shell


目录


参考 Returning Values from Bash Functions

在shell script中,函数不能直接通过return的形式返回一个值,只能通过以下几种方法来实现返回值的效果 (参考这里):

  1. echo a string
  2. return an exit status, which is a number, not a string
  3. share a variable

1. echo


shell

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注