sed命令使用示例
sed -i '/mirrorlist/d' CentOS-Base-163.repo 把有mirrorlist的行删除
sed -i '/\[addons\]/,/^$/d' CentOS-Base-163.repo 把[addons]到空行全部删除
sed -i 's/\$releasever/6/' CentOS-Base-163.repo 把$releaserver替换成6
sed -i 's/RPM-GPG-KEY-CentOS-5/RPM-GPG-KEY-CentOS-6/' CentOS-Base-163.repo 把RPM-GPG-KEY-CentOS-5替换成RPM-GPG-KEY-CentOS-6
----------------
Lynx
The quieter you become,the more you are able to hear.