Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Examples

/usr/src/packages/BUILD/yast2-core-2.12.27/agent-system/src/SystemAgent.cc

Execute functions

Execute (.target.bash, string command, map environment) -> integer Execute (.target.bash_background, string command, map environment) -> integer Execute (.target.bash_output, string command, map environment) -> map

Runs a bash command. The command is stated as string. The map variables can be used to give initial environment definitions to the target. The keys have to be strings, the values can be of any type. If you use string values, the strings may _not_ contain single quotes. Escape them with double backqoute, if you need them. This is subject to change.

The return value will be either an integer with the exitcode of the shell script or a map:

 $[
  "exit" : <integer>,  //exitcode from shell script
  "stdout" : <string>, //stdout of the command
  "stderr" : <string>  //stderr of the command
 ]

(.target.bash, "/bin/touch $FILE ; exit 5", $["FILE":"/somedir/somefile"]) -> 5


Generated on Wed Sep 14 10:34:28 2005 for yast2-core by  doxygen 1.4.4