# ShellUtil

`ShellUtil` class provides utility methods for executing shell commands.

note: to enable this utility you need to go to system -> settings -> b2datacompiler and enable Unsafe utilities

## Methods

#### `exec(...command: string[]): Integer`

Executes a shell command.

*@param*`command` — A string array containing the program and its arguments.

*@return* — The exit value of the process represented by this Process object. By convention, the value 0 indicates normal termination.

```javascript
ShellUtil.exec("program", "-firstArg", "-secondArg");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2winsuite.com/5.6/scripting/utilities/shellutil.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
