1.1.0 • Published 5 years ago

@perl/qx v1.1.0

Weekly downloads
8
License
ISC
Repository
github
Last release
5 years ago

@perl/qx

Run a command and capture its return status.

const qx = 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 = qx.sync`ls -l`

// or as an ordinary function (handy because it avoids needing quoting)
const output = await qx('ls', '-l')
qx('ls', '-l').then(output => console.log(output))
const output = qx.sync('ls', '-l')

Origins

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