I want to append to second last line of a file using NodeJs!
I hope I am making sense.
Thanks in advance
My current code which appends to end of the file:
fs.appendFile('data.txt', 'something', function (err) {
if (err) throw err;
console.log('Saved!');
});