21

http://www.linuxjournal.com

Bash functions, unlike functions in most programming languages do not allow you to return a value to the caller. When a bash function ends its return value is its status: zero for success, non-zero for failure. To return values, you can set a global variable with the result, or use command substitution, or you can pass in the name of a variable to use as the result variable. The examples below describe these different mechanisms.

Full story »
keyboardninja's picture
Created by keyboardninja 4 years 51 weeks ago – Made popular 4 years 51 weeks ago
Category: High End   Tags: