Linux下Bash运行脚本

命令行应该这样写:

sh -c "脚本字符串"

example:

  sh -c "if ! type dpkg > /dev/null ; then echo 'some messages' fi"

posted @ 2014-11-12 16:28  foo__hack  阅读(227)  评论(0编辑  收藏  举报