'system' and execute
port of ruby.
As JavaScript does not support back tick run, we have a method for that.
For node js only, does not work inside a browser.
- System
- .run(command) →
string
- .system(command) →
number
- .exec(command) →
Object
- .execDetached(command) →
Object
- .getUserName() →
string
- .run(command) →
Run a system command synchronously and return the output (stdout/stderr).
Param | Type |
---|---|
command | string |
Run a system command synchronously and return the return code.
Param | Type |
---|---|
command | string |
Run a system command synchronously and return the child process Object.
Returns: Object
- child process object
Param | Type |
---|---|
command | string |
Start a system command asynchronously and detach the process from the main process and return the child process Object.
Returns: Object
- child process object
Param | Type |
---|---|
command | string |
Get the current user name.
Fist checks for USER or USERNAME environment variable, after using operating system API.