gvar - display, set, or remove global variables
gvar [variable[=value] ...]
gvar -u variable | --unset=variable
gvar -d | --delete-environment
gvar -h | --help
gvar -v | --version
gvar is a pure Bash key-value store where each user has a different collection
of data. The records are stored in the user's home directory as ~/.gvar file.
The following options are available:
-u VARIABLE, --unset=VARIABLERemove variable VARIABLE, if it was set.
-d, --delete-environmentRemove all the global variables.
-h, --helpDisplay the command options and exit.
-v, --versionOutput version information and exit.
To print out the names and values of all the global variables, use:
$ gvar
To set global variables, use arguments of the form VARIABLE=VALUE, setting variable VARIABLE to value VALUE:
$ gvar VARIABLE=VALUE
Setting a global variable to an empty value is different from unsetting it:
$ gvar VARIABLE=
To print the value of the global variable VARIABLE, use:
$ gvar VARIABLE
To remove (unset) a global variable VARIABLE, use:
$ gvar -u VARIABLE
$ gvar --unset=VARIABLE
To delete the environment, removing all the global variables, use:
$ gvar -d
$ gvar --delete-environment
The gvar utility exits 0 on success, and > 0 if an error occurs.
gvar is copyright (c) Arturo Herrero, http://arturoherrero.com/