73 | gvar
- display, set, or remove global variables
74 |
gvar
[variable[=value] ...]
79 | gvar
-u
variable | --unset
=variable
80 | gvar
-d
| --delete-environment
81 | gvar
-h
| --help
82 | gvar
-v
| --version
gvar is a pure Bash key-value store where each user has a different collection
87 | of data. The records are stored in the user's home directory as ~/.gvar
file.
The following options are available:
92 | 93 |-u
VARIABLE, --unset
=VARIABLERemove variable VARIABLE, if it was set.
-d
, --delete-environment
Remove all the global variables.
-h
, --help
Display the command options and exit.
-v
, --version
Output version information and exit.
To print out the names and values of all the global variables, use:
104 | 105 |$ gvar
106 |
107 |
108 | To set global variables, use arguments of the form VARIABLE=VALUE, 109 | setting variable VARIABLE to value VALUE:
110 | 111 |$ gvar VARIABLE=VALUE
112 |
113 |
114 | Setting a global variable to an empty value is different from unsetting it:
115 | 116 |$ gvar VARIABLE=
117 |
118 |
119 | To print the value of the global variable VARIABLE, use:
120 | 121 |$ gvar VARIABLE
122 |
123 |
124 | To remove (unset) a global variable VARIABLE, use:
125 | 126 |$ gvar -u VARIABLE
127 | $ gvar --unset=VARIABLE
128 |
129 |
130 | To delete the environment, removing all the global variables, use:
131 | 132 |$ gvar -d
133 | $ gvar --delete-environment
134 |
135 |
136 | The gvar utility exits 0 on success, and > 0 if an error occurs.
139 | 140 |gvar is copyright (c) Arturo Herrero, http://arturoherrero.com/
143 | 144 | 145 |