unix_x executes some Windows, Linux or MacOS instructions: output in a dedicated window

## Syntax

    unix_x(commands)

## Arguments

commands

  Single text: instruction(s) Windows, Linux or MacOS to be executed.

## Description

`unix_x(…)` opens a new session of the Operating System (OS) command interpreter (sh with Linux, cmd.exe with Windows, etc..), sends `commands` to it, lets it processing `commands` instructions, receives the standard output and possible error message yielded by the processing, and closes the interpreter session.

The starting working directory and environment variables of the opened interpreter are set as described for host().

The standard output returned by the OS interpreter is redirected and displayed in a modeless dedicated window.

If an instruction in `commands` generates an error,

- the error message from the OS is displayed in the Scilab console
- `unix_x` stops and displays its own error message.
- In `commands`, the remaining unprocessed instructions are ignored.

The effects of valid instructions processed before the erroneous one remain actual (for instance, deleted files). However, their standard output is lost: no information window is opened. `commands` with multiple instructions are not recommended. They are more difficult to debug.

## Examples

    if getos() == 'Windows' then
      unix_x("dir "+""""+WSCI+"modules\graphics\demos"+"""");
    else
      unix_x("ls $SCI/modules/graphics/demos");
    end

## See also

- unix_g
- unix_s
- unix_w
- host
- powershell
- setenv
- messagebox