node.js执行shell命令
2015-09-09 14:32
786 查看
nodejs功能强大且多样,不只是可以实现 服务器端 与 客户端 的实时通讯,另一个功能是用来执行shell命令
首先,引入子进程模块
然后,调用该模块暴露出来的方法exec
回调函数非必须!
首先,引入子进程模块
var
process = require(
'child_process'
);
然后,调用该模块暴露出来的方法exec
回调函数非必须!
相关文章推荐
- Shell脚本中变量$
- 在Setting中增加一项用来执行shell脚本,将脚本打印信息显示在Alertdialog中。
- adb shell dumpsys的使用
- shell脚本学习(1)——输出echo&printf
- 用shell脚本一键搭建LNMP环境实战
- 一个备份MySQL数据库的简单Shell脚本
- Bash shell 简单的并行任务,并等待
- shell中的重定向 1>&2 2>&1 >&2
- 【Android】Windows批处理bat,执行adb shell指令
- shell学习总结
- linux下提示bash:command not found
- VxWorks操作系统shell命令与调试方法总结
- AD-Powershell for Active Directory Administrators
- AD-Powershell for Active Directory Administrators
- shell 小脚本
- shell 脚本中 命令
- powershell的一个小游戏,看看能写几种方式出来
- shell脚本是否作为单独的一个进程执行?
- shell运算
- Vim,find,bash,Linux文件系统的特殊权限2015.8.30作业