#!/bin/bash
a=1
while true
do
p=`echo $a`
name=`awk NR==$p isaname.txt`
name1=${name%*.rpm} #将结尾的.rpm去除
echo "$name1"
if [ -z "$name" ];then
echo "finish"
break
fi
ret=` grep $name1 local.txt`
if [ -n "${ret}" ]; then
cp -rf $name ./test
echo $name1
fi
((a++))
done
原文地址:https://www.cnblogs.com/Leo-Wanta/p/11207335.html
时间: 2024-11-08 14:21:43