drush php-script

Run php script(s).

Drush Command

drush php-script

Arguments

filename : Optional. The file you wish to execute (without extension). If omitted, list files ending in .php in the current working directory and specified script-path. Some might not be real drush scripts. Beware.

Aliases

drush scr

Options

--script-path : [object Object]

Examples

Run scratch.php script. See commands/core directory.

drush php-script scratch
Run script from specified paths
drush php-script example --script-path=/path/to/scripts:/another/path
List all available scripts.
drush php-script
Execute php code with a full Drupal bootstrap directly from a shell script.
#!/usr/bin/env drush
<?php
variableset('key', drushshift());