passthru
v0.0.1 passthru spawn child_process
node-passthru
Spawns a child process attached to parent's stdin, stdout and stderr. Inspired by PHP's passthru().
Usage
passthru(command, [options], [callback]);
For example, do an ls -la
in the current directory:
var passthru = require('passthru');
passthru('ls -la', function(err) {
// ...
});
You can also pass command as an array of strings. This is mandatory for arguments containing spaces and other special characters.
passthru(['ls', '-la'], function(err) {
// ...
});
You can use any options supported by child_process.spawn
:
passthru('ls -la', {cwd: '/tmp'}, function(err) {
// ...
});
npm i [email protected]
Homepage
github.com/laggyluke/node-pa...Metadata
- Unknown
- >0.2
- Unknown
- released 7/8/2011