3.2 Miscellaneous functions

Function: mbfl_set_maybe NAME VALUE

Set a variable named NAME to VALUE, but only if NAME is not the empty string; if VALUE is the empty string: the old value of NAME is left untouched.

Function: mbfl_read_maybe_null VARNAME

Read a line from its stdin and store it in a variable named VARNAME. If mbfl_option_null() returns true: the null character is used as terminator, as in:

IFS= read -d $'\x00'

This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.