标签: node.js bash function shell
我目前正在使用以下命令在我的NodeJS cert-check-script.sh文件中执行名为index.js的脚本:
cert-check-script.sh
index.js
exec('sh cert-check-script.sh');
有没有办法在这个脚本中调用特定的函数而不是执行整个函数?
答案 0 :(得分:0)
我最终只是将功能代码解压缩到一个单独的脚本中并在其上调用exec。
exec