摘要: 原文 http://www.jb51.net/article/55327.htm 最近有个需求就是页面上执行shell命令,第一想到的就是os.system, os.system('cat /proc/cpuinfo') 但是发现页面上打印的命令执行结果 0或者1,当然不满足需求了。 尝试第二种方案 阅读全文
posted @ 2017-07-21 10:35 嘿.嘿.嘿 阅读(67832) 评论(1) 推荐(2)
摘要: 原文vi ./Get_Dist_Name.sh #!/bin/bash Get_Dist_Name() { if grep -Eqii "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then DISTRO='CentOS' PM=' 阅读全文
posted @ 2017-07-21 10:32 嘿.嘿.嘿 阅读(4896) 评论(0) 推荐(0)