shell:批量下载epel源rpms

for i in $(cat test)
do
   mkdir $i
   rpm_url=$(curl https://mirrors.aliyun.com/epel/8/Everything/x86_64/Packages/$i > $i_rpm.html)
   for j in $(cat $i_rpm.html | xargs -n1 | grep rpm | sed "s#href=##" | sed "s#># #" | xargs -n1 | grep rpm$ | sort -u)
   do
       wget https://mirrors.aliyun.com/epel/8/Everything/x86_64/Packages/$i/$j
   done
   rm -rf $i_rpm.html
done

cat nginx | xargs -n1 | grep rpm | sed “s#href=##” | sed “s#># #” | xargs -n1 | grep rpm$ | sort -u | xargs -i wget http://nginx.org/packages/centos/7/x86_64/RPMS/{}

wget --no-check-certificate

你可能感兴趣的:(编程语言,linux)