unix

Executes the unix shell command stringCommand.

Syntax

R1 =unix(stringCommand)

[R1, R2] = unix(stringCommand)

Inputs

stringCommand
A string to execute in operating system shell.
Type: string

Outputs

R1
The status of the system command executed
Type: integer
R2
Optional output which contains any text echoed to standard output when the system command is executed.
Type: string

Example

Run the system command, without retrieving the output
R = unix('ls')
R = 0
Run the system command, with the text displayed to standard output
[R1, R2] = unix('ls')
R1 = 0
R2 = test1.txt
test2.txt