日志格式脚本:#!/bin/bash#shell统计IP个数#if [[ $2 == "ip" ]];then grep -E "http://yygame.duowan.com/strife/full/Strife_V0.3.*._*FULL.exe|http://yygame.duowan.com/strife/full/[1-9]*/Strife_V0.3.*._*
[root@qy caishenye]# tail -f /data/caishenye/sa_9_0.log PHP Warning: mkdir(): No such file or directory in /data/caishenye/sa_9_0.php on line 18PHP Fatal error: Call to undefined function
转载:http://blog.csdn.net/ysdaniel/article/details/7905818整理自:http://bbs.chinaunix.net/thread-278896-2-1.html1. 概念上来说"[[",是关键字,许多shell(如ash bsh)并不支持这种方式。ksh, bash(据说从2.02起引入对[[的支持)等支持。"["是
转载:http://blog.chinaunix.net/uid-16480950-id-103953.html
要求:假如现在有个文本,格式如下:a 1b 2c 3b 4a 5d 6f 7g
[chenweibo@jump1:~]$ cat ip.txttcp 0 0 183.60.177.233:30677 58.215.46.34:32200 ESTABLISHED t
3 5 6 72 3 1 04 5 6 92 3 4 42 2 1 04 5 0 9假如把2列和3列的值作为新的第5列,第5列的平均值为avg5,求第5列中大于avg5的行数。awk 'BEGIN{while(getline<"file"){x+=$2+$3;i++};y=x/i}{if($2+$3>y)z++}END{print z}' file[解析] 在BEGIN模块
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号