Linux下Bash运行脚本

命令行应该这样写:

sh -c "脚本字符串"

example:

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

原文地址:https://www.cnblogs.com/foohack/p/4092609.html