for i in `cat t1` ; do echo "$i" | awk ‘{sub(/^ */,"");sub(/ *$/,"")}1‘ >> tem1 ; done
for i in `cat t2` ; do echo "$i" | awk ‘{sub(/^ */,"");sub(/ *$/,"")}1‘ >> tem2 ; done
cat tem1 >> tem3
cat tem2 >> tem3
cat tem3|sort|uniq -c |awk ‘{if ( $1 > 1) print $2 }‘ > tem4
for i in `cat tem2`
do
FLAG=0
for j in `cat tem4`
do
if [ $i == $j ]
then
echo "$i found"
FLAG=1
break
fi
done
if [ ${FLAG} -eq 0 ]
then
echo "$i"
fi
done
时间: 2024-11-06 03:49:14