regex – 如何使用shell脚本查找Linux Distribution名称?
发布时间:2020-05-23 11:42:55 所属栏目:Linux 来源:互联网
导读:我正在编写一个shell脚本,其中我需要当前的操作系统名称以使其通用.喜欢:if [ $Operating_System == CentOS ] then echo CentOS; # Do this elif [ $Operating_System == Ubuntu ] then echo Ubuntu;
|
我正在编写一个shell脚本,其中我需要当前的操作系统名称以使其通用.喜欢:
怎么可能?在lsb_release -a命令或其他地方应用正则表达式? 谢谢.. 最佳答案 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
