Skip to content

Exec

Exec object is used to execute shell commands.

Basic Usage

var exec = require('core/v4/exec');
var response = require('http/v4/response');

var result = exec.exec("echo 'hello dirigible!'");
response.println("[Result]: " + result);
response.flush();
response.close();

Functions


Function Description Returns
exec(commandLine, toAdd, toRemove) Executes the commandLine string and returns the result from the execution or exception message. Passing an object as toAdd parameter sets the corresponding variables. toRemove parameter is used to unset the variables string