node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

@perl/qx

@perl/qx

Run a command and capture it's return status.

const system = require('@perl/qx')
 
// capture the output from `ls -l`
const output = await qx`ls -l`
 
// with promises
qx`ls -l`.then(output => console.log(output))
 
// also available in synchronous version
const output = system.sync`ls -l`
 

Origins

This is intended to provide the same functionality as the Perl qx syntax.