0.1.0 • Published 7 years ago
shellcmd v0.1.0
Run shell commands from NodeJS
Package Information
Usage
require('shellcmd')(
'cmd 1',
'cmd 2',
'cmd n',
'...',
{ options }
, 1
)Force stdout output for errors
When 1 is passed as the final argument, stdout will be returned instead of an object when an error is encountered.
Options Object
cwdstring - Current working directory of the child processenvobject - Environment key-value pairsencodingstring - Default: 'utf8'shellstring - Shell where the command will be executed - Default: - UNIX:/bin/sh- Windows:process.env.ComSpectimeoutnumber - Default: 0maxBuffernumber - Largest amount of data in bytes allowed on stdout or stderr. - If exceeded, the child process is terminated. - Default: 200*1024killSignalstring | integer - Default: 'SIGTERM'uidnumber - Sets the user identity of the process.gidnumber - Sets the group identity of the process.