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.