kattu
Run commands quietly unless the command fails
Last updated 5 years ago by techgaun .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kattu 
SYNC missed versions from official npm registry.

kattu Build Status

Run commands quietly unless the command fails

Usage

I often wish to run commands but hide the output unless the command fails. In such cases, I would love to see both stdout and stderr so that I can analyze the issues. Mostly I use this while doing sysadmin stuffs.

Install

$ npm install --save kattu

Usage

const kattu = require('kattu');

kattu('ls /tmp');
//=>

kattu('ls /tmp/does/not/exist');
//prints => ls: cannot access /tmp/does/not/exist: No such file or directory

API

kattu(cmd)

cmd

Type: string

Pass the command you wish to run.

CLI

$ npm install --global kattu
$ kattu --help

  Usage
    kattu [cmd]

  Examples
    $ kattu ls /tmp
    $ kattu ls /tmp/does/not/exist
    ls: cannot access /tmp/abc: No such file or directory

License

MIT © techgaun

Current Tags

  • 0.1.2                                ...           latest (5 years ago)

3 Versions

  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (1)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |