#!/bin/sh
########################################
# Fuction: delete the duplicate keyworld
# from the file
# History: xulei First release
#
########################################
KEYWORLDS=`cat log.txt | egrep --color --only-matching "PG[0-9]{5}"`
KEYFILE=/tmp/keyworld.txt
cat /dev/null > ${KEYFILE}
for i in ${KEYWORLDS}
do
cat ${KEYFILE} | grep $i
if [[ "$?" != "0" ]];then
{
echo $i >> ${KEYFILE}
}
fi
done
去除重复关键字
最新推荐文章于 2025-07-16 16:16:43 发布