Scilab Function

unix_g - shell (sh) command execution, output redirected to a variable

### Calling Sequence

  `rep=unix_g(cmd)`

### Parameters

- `cmd` : a character string
- `rep` : a column vector of character strings

### Description

Sends a string `cmd` to Unix for execution by the sh shell. The standard output is redirected to scilab variable `rep`. Unix execution errors are trapped; *NOTE* that only the last shell command error is reported when a list of command separated by ";" is sent: this is not recommended.

### Examples

    if MSDOS then unix_g('dir '+WSCI+'\demos');
    else unix_g("ls $SCI/demos"); end
    deff('wd=pwd()','if MSDOS then wd=unix_g(''cd'');..
                     else wd=unix_g(''pwd''); end')
    wd=pwd()

### See Also

`edit` `manedit` `unix_s` `unix_w` `unix_x` `unix`