💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
脚本可以通过 child_process 模块新建子进程,从而执行 Unix 系统命令。 ~~~ #!/usr/bin/env node var name = process.argv[2]; var exec = require('child_process').exec; var child = exec('echo hello ' + name, function(err, stdout, stderr) { if (err) throw err; console.log(stdout); }); ~~~ 用法如下。 ~~~ $ ./hello tom hello tom ~~~