@mh-cbon/getent

1.0.2 • Public • Published

getent

Provides getent response parsing to JSON.

install

  npm i @mh-cbon/getent --save

usage

  var jgetent = require('@mh-cbon/getent')

  var opts = {
    'idn': false,
    services: ['xxx']
  };
  var db = 'ahosts';
  var keys = ['amd.com'];

  jgetent(opts, db, keys, function (code, err, data) {
    process.exitCode = parseInt(code);
    if (code!==0) err && console.error(err);
    else data && console.log(JSON.stringify(data, null, 2));
  });

as a binary

  npm i @mh-cbon/getent -g
  jgetent ahosts
  jgetent rpc
  jgetent passwd

see man getent

Readme

Keywords

Package Sidebar

Install

npm i @mh-cbon/getent

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mh-cbon