Answers for "node execute shell commands"

9

node execute shell commands

const { exec } = require("child_process");
exec("cat index.js", (error, data, getter) => {
	if(error){
		console.log("error",error.message);
		return;
	}
	if(getter){
		console.log("data",data);
		return;
	}
	console.log("data",data);

});
Posted by: Guest on April-11-2020

Code answers related to "node execute shell commands"

Code answers related to "Javascript"

Browse Popular Code Answers by Language