This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 检查系统版本 | |
if [ -f /etc/redhat-release ]; then | |
OS_VERSION=$(grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release) | |
else | |
echo "未找到 /etc/redhat-release 文件。请确保您运行的是 CentOS 系统。" | |
exit 1 | |
fi |
OlderNewer