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.
Outputs
- R1
- The status of the system command executed
- R2
- Optional output which contains any text echoed to standard output when the system command is executed.
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