function drush_shell_exec

8.0.x drush_shell_exec($cmd)
6.x drush_shell_exec($cmd)
7.x drush_shell_exec($cmd)
3.x drush_shell_exec($cmd)
4.x drush_shell_exec($cmd)
5.x drush_shell_exec($cmd)
master drush_shell_exec($cmd)

Executes a shell command. Output is only printed if in verbose mode. Output is stored and can be retrieved using drush_shell_exec_output(). If in simulation mode, no action is taken.


$cmd: The command to execute. May include placeholders used for sprintf.

...: Values for the placeholders specified in $cmd. Each of these will be passed through escapeshellarg() to ensure they are safe to use on the command line.

Return value

TRUE on success, FALSE on failure

Related topics

21 calls to drush_shell_exec()
core_cli_bashrc in commands/core/
drush_archive_dump in commands/core/
Command callback. Generate site archive file.
drush_core_call_rsync in commands/core/
Make a direct call to rsync after the source and destination paths have been evaluated.
drush_core_site_install_version in commands/core/drupal/
Install Drupal 6.x
drush_environment_table_inc in includes/

... See full list

1 string reference to 'drush_shell_exec'
drush_shell_cd_and_exec in includes/
Executes a shell command at a new working directory. The old cwd is restored on exit.


includes/, line 1286
The drush API implementation and helpers.


function drush_shell_exec($cmd) {
  return _drush_shell_exec(func_get_args());