awk -F= '/^NAME/{print $2}' /etc/os-release centos输出结果 "CentOS Linux" ubuntu输出结果 "Ubuntu" 转载于:https://www.cnblogs.com/chenjiye/p/10877136.html