文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>filter\move

filter\move

时间:2007-12-25  来源:061107

#!awk -f
{
        ip=$1
        i=index($0,"\"Mozilla")
        if (i>1)
        {
                ua = substr($0,i)
                print ip " - " ua
        }
}
  #!/usr/bin/awk -f
{
       if (NF>8)
         {
             if ($9 ne "AW2)")
                print $10
         }
}
      #move.sh #!/bin/sh
len=`wc -l < /data_tape/data1/lst/lst.$1`
mkdir /data_tape/data1/$1
n=1
while test "$n" -le "$len"
do
        file=`tail +$n /data_tape/data1/lst/lst.$1 | head -1`
echo "$file"
        n=`expr $n + 1`
        #dir=/data/$file
        #[ !-d $dir ] && dir=/data2/$file
        cp -Rf /data_tape/data1/$file /data_tape/data1/$1/
done
    #filter.sh
#!/bin/sh
dir="/data1/${1}"
#rm ${1}.txt
for filename in `find $dir -name '*.txt' -type f`
do
        #cat $filename | awk '{i=index($0,"Mozilla");if(i>1)print $1}' >>${1}${DR}.ip.txt
        #cat $filename | awk '{if(NF>8){if($9 ne "AW2")print $10}}' >>a.txt
        cat $filename | grep -v 'AW2)$' | grep -v 'Windows)$'  >>${1}.txt
//grep -v '5\.[10])$' 
        #expr "$t" : '.*\(.*\))' >>a.txt
        #expr "$t" : '.*;\(.*\))' >>a.txt
done
    #Mozilla.sh #!/bin/sh
len=`wc -l < ./lst/lst.$1`
#DR=`date +"%y%m%d%H%M"`
#rm ${1}${DR}.log
#rm ${1}${DR}.ip.txt
echo $len >>${1}${DR}.log
echo '----------------------------' >>${1}${DR}.log
n=1
while test "$n" -le "$len"
do
        file=`tail +$n ./lst/lst.$1 | head -1`
        n=`expr $n + 1`
        echo $file >>${1}${DR}.log
        echo $file 2 >>${1}${DR}.err.log
        for filename in `find $file -name "*.txt" -type f`
        do
                cat $filename | awk '{i=index($0,"Mozilla");if(i>1)print $1}' >>${1}${DR}.Mozilla
        done
done
   
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载