1const { exec } = require("child_process");
2
3exec("ls -la", (error, stdout, stderr) => {
4 if (error) {
5 console.log(`error: ${error.message}`);
6 return;
7 }
8 if (stderr) {
9 console.log(`stderr: ${stderr}`);
10 return;
11 }
12 console.log(`stdout: ${stdout}`);
13});
14