Skip to content

Commit 422cb44

Browse files
committed
exec example file
1 parent 4534d1f commit 422cb44

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

child-processes/exec-simple.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const { exec } = require('child_process');
2+
3+
exec('ls -l', (err, stdout, stderr) => {
4+
console.log(stdout);
5+
});
6+

child-processes/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ In this example, we will call the `ls` command to listwith the optional param `-
3838

3939
const { exec } = require('child_process');
4040

41-
// exec
4241
exec('ls -l', (err, stdout, stderr) => {
4342
console.log(stdout);
4443
});

0 commit comments

Comments
 (0)