#!/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