@mh-cbon/getent
v1.0.2
Published
getent to json
Downloads
45
Readme
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