@perl/qx

1.1.0 • Public • Published

@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.

Readme

Keywords

none

Package Sidebar

Install

npm i @perl/qx

Weekly Downloads

12

Version

1.1.0

License

ISC

Unpacked Size

3.57 kB

Total Files

4

Last publish

Collaborators

  • iarna