Executes a shell command. You can use this to quickly add a new command to Phing. However, if you want to use this regularly, you should think about writing a Task for it.
Table 38. Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
command |
String |
The command that is to be executed. | n/a | One of the two |
executable |
String |
The command to execute without any command line arguments. | n/a | |
dir |
String |
The directory the command is to be executed in. | n/a | No |
output |
String |
Where to direct stdout. | n/a | No |
error |
String |
Where to direct stderr. | Redirected to stdout, unless
passthru is set to true.
|
No |
os |
String |
Only execute if the Fact Sheet property contains specified text. | n/a | No |
escape |
Boolean |
By default, we escape shell metacharacters before executing. Setting this to false will disable this precaution. | true |
No |
passthru |
Boolean |
Whether to use PHP's passthru() function instead of exec(). | false |
No |
logoutput |
Boolean |
Whether to log returned output as MSG_INFO instead of MSG_VERBOSE. | false |
No |
spawn |
Boolean |
Whether to spawn unix programs to the background, redirecting stdout. | false |
No |
returnProperty |
String |
Property name to set return value to from exec() call. | n/a | No |
outputProperty |
String |
Property name to set output value to from exec() call. | n/a | No |
checkreturn |
Boolean |
Whether to check the return code of the program, throws a BuildException when returncode != 0. | false |
No |
level |
String |
Control the level at which status messages are reported. One of
error , warning ,
info , verbose ,
debug .
|
verbose |
No |