Execute a command in a system shell. |
||
Syntax |
bs, result = unix(command) bs, result = unix(command, '-echo') |
|
Argument |
Name |
Description |
|
command |
A string to be executed in the system shell. |
|
'-echo' |
To force the display of the result of the command in the HyperMath command window. |
Outputs |
Name |
Description |
|
bs |
An integer: 0 for success, 1 upon failure of the system command. |
|
result |
A string: the output of the system command. |
Example |
Syntax |
|
|
bs , output = unix('dir') // on linux, mac bs , output = unix('ls') |
|
Comments |
'unix' executes a system command; the system command is platform dependent. A command working on Windows could work on Linux or Mac. |
|
See Also: |