下載並修改

#!/bin/bash
lftpget ftp://192.168.0.254:/pub/gls/centos.repo /tmp
if ls -l /tmp | grep "^centos.repo$" &> /dev/null; then
CENTORS="/tmp/centos.repo"
echo "$CENTORS is here"
sed -i "s\^baseurl=.*\baseurl=http://mirrors.sohu.com/centos\g" $CENTORS
mv $CENTORS /etc/repos.d/
else
echo "$CENTORS is not here."
fi
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章