fs exec child process

Solutions on MaxInterview for fs exec child process by the best coders in the world

showing results for - "fs exec child process"
Samuel
04 Jan 2021
1const { exec } = require('child_process');
2
3exec('"/path/to/test file/test.sh" arg1 arg2');
4// Double quotes are used so that the space in the path is not interpreted as
5// a delimiter of multiple arguments.
6
7exec('echo "The \\$HOME variable is $HOME"');
8// The $HOME variable is escaped in the first instance, but not in the second.