我怎样才能运行简单的 bash 命令,比如rm -rf directory
或者使用commander.js echo whatever
?
You can run within your script command like so:
var program = require('commander');
program
.version('0.0.1')
.command('rmdir <dir>')
see full examples at: https://github.com/tj/commander.js/#commands
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.