I have a working bash script which extracts raw data from an image. I\'m converting this script into JS (node.js) and am having trouble converting a piped command into its c