node.js - combinedStream not same checksum on join parts of chunk nodejs -


i using nodejs concatinate multiple chunks of 1 mb files. linux cat command works:

cat /tmp/part.* >> /tmp/full 

using following gives other sha256 checksum:

//at point /tmp/full non existing. for(var = 0; < 5; i++) {   var combinedstream = combinedstream.create();   combinedstream.append(fs.createreadstream("/tmp/part."+i));   combinedstream.pipe(fs.createwritestream("/tmp/full", {'flags': 'a'})); } 

i tested spawnsync, strange error:

var cat = require('child_process').spawnsync("/bin/cat", ["/tmp/part.1", ">>", "tmp/full"]); console.log(cat.status ); console.log(cat.stderr.tostring()); console.log(cat.error); 

output:

1 /bin/cat: >>: no such file or directory /bin/cat: tmp/full: no such file or directory  undefined 

what doing wrong?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -