Process Implementation

read_opt_value_from_func_args()

Public: Reads the value of a given option from function arguments.

  • $1 - Option name whose value we want to obtain.

  • $2,$3,…,$n - List of function arguments (typically they are provided by the caller using the special parameter “$@”).

Examples

local str=$(read_opt_value_from_func_args “-s” “$@”)

The function prints the value of the option if it was given, or the “OPT_NOT_FOUND” constant otherwise.