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

30 calls to drush_shell_exec()
DrushMakeProject::applyPatches in commands/make/make.project.inc
Retrieve and apply any patches specified by the makefile to this project.
drush_archive_dump in commands/core/archive.drush.inc
Command callback. Generate site archive file.
drush_complete_match_file in includes/complete.inc
Retrieves the appropriate list of candidate file/directory completions, filtered by the last word that we are trying to complete.
drush_config_edit in commands/core/config.drush.inc
Edit command callback.
drush_config_import in commands/core/config.drush.inc
Command callback. Import from specified config directory (defaults to sync).

... See full list

4 string references to 'drush_shell_exec'
drush_shell_cd_and_exec in includes/exec.inc
Executes a shell command at a new working directory. The old cwd is restored on exit.
make_download_bzr in commands/make/make.download.inc
Checks out a Bazaar repository to the specified download location.
make_download_git in commands/make/make.download.inc
Checks out a git repository to the specified download location.
make_download_svn in commands/make/make.download.inc
Checks out an SVN repository to the specified download location.

File

includes/exec.inc, line 80
Functions for executing system commands. (e.g. exec(), system(), ...).

Code

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