📜  fs exec 子进程 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:08.592000             🧑  作者: Mango

代码示例1
const { exec } = require('child_process');

exec('"/path/to/test file/test.sh" arg1 arg2');
// Double quotes are used so that the space in the path is not interpreted as
// a delimiter of multiple arguments.

exec('echo "The \\$HOME variable is $HOME"');
// The $HOME variable is escaped in the first instance, but not in the second.