drush variable-get

Get a list of some or all site variables and values.

Drush Command

drush variable-get

Arguments

name : A string to filter the variables by. Variables whose name contains the string will be listed.

Aliases

drush vget

Options

--exact : Only get the one variable that exactly matches the specified name.  Output will contain only the variable's value.
--format : [object Object]
--fields : [object Object]
--list-separator : [object Object]
--line-separator : [object Object]
--field-labels : [object Object]
--format=json : [object Object]
--format=config : [object Object]
--format=csv : [object Object]
--format=html : [object Object]
--format=labeled-export : [object Object]
--format=list : [object Object]
--format=php : [object Object]
--format=print-r : [object Object]
--format=string : [object Object]
--format=table : [object Object]
--format=var_export : [object Object]
--format=variables : [object Object]
--format=yaml : [object Object]

Examples

List all variables and values.

drush vget
List all variables containing the string "user".
drush vget user
Show only the value of the variable with the exact key "sitemail".
drush vget sitemail --exact
Show only the variable with the exact key "sitemail" without changing the structure of the output.
drush vget sitemail --exact --pipe