function drush_shell_exec

8.0.x exec.inc drush_shell_exec($cmd)
6.x exec.inc drush_shell_exec($cmd)
7.x exec.inc drush_shell_exec($cmd)
3.x drush.inc drush_shell_exec($cmd)
4.x drush.inc drush_shell_exec($cmd)
5.x exec.inc drush_shell_exec($cmd)
master exec.inc 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.

Parameters

$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/core.drush.inc
drush_archive_dump in commands/core/archive.drush.inc
Command callback. Generate site archive file.
drush_core_call_rsync in commands/core/rsync.core.inc
Make a direct call to rsync after the source and destination paths have been evaluated.
drush_core_site_install_version in commands/core/drupal/site_install_6.inc
Install Drupal 6.x
drush_environment_table_inc in includes/environment.inc

... See full list

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

File

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

Code

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