drush variable-getfor drush 8x


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

drush variable-get

  • Aliases


    variable-get has 1 alias/es:


    drush vget

  • Arguments


    variable-get accepts 1 argument/s:


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

  • Options


    variable-get accepts 19 option/s:


    --exact : Only get the one variable that exactly matches the specified name.  Output will contain only the variable's value.

    --format

    --format : format

    --fields

    --fields : fields

    --list-separator

    --list-separator : list-separator

    --line-separator

    --line-separator : line-separator

    --field-labels

    --field-labels : field-labels

    --format=json

    --format=json : format=json

    --format=config

    --format=config : format=config

    --format=csv

    --format=csv : format=csv

    --format=html

    --format=html : format=html

    --format=labeled-export

    --format=labeled-export : format=labeled-export

    --format=list

    --format=list : format=list

    --format=php

    --format=php : format=php

    --format=print-r

    --format=print-r : format=print-r

    --format=string

    --format=string : format=string

    --format=table

    --format=table : format=table

    --format=var_export

    --format=var_export : format=var_export

    --format=variables

    --format=variables : format=variables

    --format=yaml

    --format=yaml : format=yaml

  • 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 "site_mail".

    drush vget site_mail --exact

    Show only the variable with the exact key "site_mail" without changing the structure of the output.

    drush vget site_mail --exact --pipe

  • Comments


    comments powered by Disqus