Skip to content

Instantly share code, notes, and snippets.

@rpivo
Last active April 3, 2021 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpivo/440e4390440c75ed4756f79b6c90e4d0 to your computer and use it in GitHub Desktop.
Save rpivo/440e4390440c75ed4756f79b6c90e4d0 to your computer and use it in GitHub Desktop.
Piping Output From a Child Process to the Parent Process in Node

Piping Output From a Child Process to the Parent Process in Node

You can pipe the output of a child process by setting the stdio property to "inherit" for any child process in node.

const child_process = require("child_process");

child_process.execSync("ls -a", { stdio: "inherit" });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment