清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#! /bin/bash
function extract_pthread_log
{
i=0
while [ $i -lt 20 ]
do
if [ $i -lt 10 ]; then
var="pthread0$i"
else
var="pthread$i"
fi
filename="$var.log"
#echo "[$var, $filename]"
grep -i $var $1 > $filename
i=$[$i+1]
done
}
if [ -f $1 ]
then
extract_pthread_log
fi
exit 0