Bash - Return value from subscript to parent script

后端 未结 3 2037
心在旅途
心在旅途 2021-01-31 14:46

I have two Bash scripts. The parent scripts calls the subscript to perform some actions and return a value. How can I return a value from the subscript to the parent script? Add

3条回答
  •  北海茫月
    2021-01-31 15:31

    return a value from the subscript and check the variable $? which contain the return value

提交回复
热议问题