Linux下Bash运行脚本
2014-11-12 16:28
155 查看
命令行应该这样写:
sh -c "脚本字符串"
example:
sh -c "if ! type dpkg > /dev/null ; then echo 'some messages' fi"
sh -c "脚本字符串"
example:
sh -c "if ! type dpkg > /dev/null ; then echo 'some messages' fi"
相关文章推荐
- 在fedora14装载的linux上,创建一个可运行的bash脚本文件
- Linux下运行bash脚本显示“: /usr/bin/env: "bash\r": 没有那个文件或目录
- 一个将java程序运行在linux系统后台的脚本
- linux下开机自动运行脚本以及定时任务的处理
- Linux在启动时,自动运行脚本
- linux下,自动telnet到远程主机上运行的脚本
- 朋友的一个问题:Linux开机如何自动运行自己编写好的shell脚本
- 让一个脚本自动定时运行,设置、启动 linux定时脚本 (crontab详解)
- 设置 linux定时运行命令脚本 (crontab详解)
- 通过crond自动运行Python脚本实现多台linux服务器的监控
- Linux Bash Shell学习(七):shell编程基础——运行Shell脚本、function
- ubuntu下shell脚本运行异常:bash和dash的区别
- linux 能否实现用户登录运行脚本?
- Linux--在当前shell环境下运行脚本的方法
- 在Linux中开机自动运行普通用户脚本程序
- Linux开机如何自动运行自己编写好的shell脚本
- 在Linux中,开机自动运行普通用户的脚本程序
- Linux能否实现用户登录运行脚本?
- Linux下创建脚本并用命令方式运行
- linux自动装载Windows下的分区以及bash启动脚本自定义命令