1219作业

作业:
写脚本,完成任务

1自动到ftp://192.168.0.254/pub/gls,centos.repo 下载到/tmp目录
2判断此文件是否存在,如果存在,则修改其中的baseur1=http://mirropos.163.com/centos 为
http://mirrors.sohu.com/centos,将修改后的文件移至/etc/repos.d/
3.安装一个软件pidgin


#!/bin/bash
cd /tmp
lftpget ftp//192.168.0.254//pub/gls/centos.repo
if [ -e /tmp/centos.repo ];then
sed -i 's/163/sohu/g' centos.repo
fi
mv centos.repo /etc/yum.repos.d/
yum install pidgin


你可能感兴趣的:(职场,休闲,自动下载并安装软件)