Skip to content

Instantly share code, notes, and snippets.

View bloatfan's full-sized avatar
🤒
Out sick

bloatfan bloatfan

🤒
Out sick
View GitHub Profile
@bloatfan
bloatfan / yumcentos7.sh
Created October 19, 2024 10:49
yumcentos7
#!/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