linux-shell-command
Node.JS Spawn wrapper
Examples
shellCommand
The function "shellCommand" should always be called inside a try/catch block.
var shellCommand = shellCommand; //Simple commandvar sc = ;/*Processed command:$ ls*/ //Command with 1 argumentsvar sc = ;/*Processed command:$ ls '/'*/ //Command with 2 argumentsvar sc = ;/*Processed command:$ cp file1 file2*/ //Command expecting the exit status to be equals to 1var sc = ; //Check the processed commandconsole; //Get Events from the executed commandvar sc = ;scevents ;
Promise (shellCommand)
var shellCommand = shellCommand; //Execute the commandtry var sc = ; sc ; catch e console;
Callback (shellCommand)
var shellCommand = shellCommand; //Execute the commandtry var sc = ; sc; catch e console;
Execute
Promise (Execute)
var execute = execute; ; //OR ;
Callback (Execute)
var execute = execute; //The variable "sc" become an instance of ShellCommand at the end of the executionvar sc = ;