NodeJs Example of Scripting Linux command line calls

This shows an approach to using NodeJs for scripting linux command line calls. The goal is to try to use a more functional programming approach. A chain of promises is used. Each call to the linux command line is asynchronous so JavaScript promises provide a clean way to manage this. The JavaScript library lodash is used to provide functionality. `
'use strict'; module.exports.fileProcessor = (() => { const _ = require('lodash');
const util = require('util')
const exec = require('child_process').exec;
var child;