awk file del log for c++
来源:互联网 发布:netty rpc 网络 编辑:程序博客网 时间:2024/06/11 05:46
#! /usr/bin/awk
BEGIN {
add = 0
# addr = 0
line = 1
line1 = 0
line2 = 0
line3 = 0
line4 = 0
line5 = 0
line6 = 0
}
{
# print "line=",line
# print "add =",add
if (add)
{
print "#ifdef DEBUG"
print " printf(/"enter %s(%d)-%s//n/",__FILE__,__LINE__,__FUNCTION__);"
print "#endif"
add = 0
# addr = 1
line1 = 0
line2 = 0
line3 = 0
line4 = 0
line5 = 0
line6 = 0
# print "after addlog add= ",add
}
# if (( index($0,"return") > 1 && index($0,"return") < 5 && addr == 1))
# {
# addr = 0
# print "#ifdef DEBUG"
# print " printf(/"leave %s(%d)-%s//n/",__FILE__,__LINE__,__FUNCTION__);"
# print "#endif"
# }
# if ( index($0,"}") == 1 && addr == 1)
# {
# addr = 0
# print "#ifdef DEBUG"
# print " printf(/"leave %s(%d)-%s//n/",__FILE__,__LINE__,__FUNCTION__);"
# print "#endif"
# }
print $0
if ( index($0,"::") > 0 )
{
line1 = line
}
# print "line1=",line1
if ( index($0,"(") > 0 )
{
line2 = line
}
# print "line2=",line2
if ( index($0,"{") == 1 )
{
line3 = line
}
if ( index($0,"}") > 1)
{
line4 = line
}
if ( index($0,"//") > 0)
{
line5 = line
}
if (match($0,/class|enum|struct/) > 0 )
{
line6 = line
}
if ( index($0,"}") == 1 )
{
line1 = 0
line2 = 0
line3 = 0
line4 = 0
line5 = 0
line6 = 0
}
#print "line3=",line3
if( (line2 >= line1 && line2 <= line1+5) && line1 > 0 )
{
if( line3 > line2)
{
if( line4 != line3 && line3 != line5 && line3 != line6+1 )
{
add = 1;
}
}
}
line++
}
END{
add = 0
exit 0;
}
- awk file del log for c++
- awk add log for c++
- log for c
- DEL TEMP FILE
- Skills for generating debug log file
- Log file location for Oracle EBS R12
- The log file for database '' is full
- C++ Log File Class
- tail -f xxx.log|awk '{print $3}'|uniq -c
- log file
- SQL*Loader-522: lfiopn failed for file (adsP_T.log
- Log file location for Oracle E-Business Suite R12
- Log file location for Oracle E-Business Suite R11
- Log file location for Oracle E-Business Suite R12
- SQL*Loader-522: lfiopn failed for file (xxx.log)
- SQL*Loader-522: lfiopn failed for file (xxx.log)
- zabbix:unable to create mutex for log file
- Android add log for c/c++
- 如何做服务器安全维护
- ubuntu10.10配置tftp
- awk add log for c++
- lwIP(V1.3.0)RAW_API译文
- Total Cammander中容合SVN
- awk file del log for c++
- 20个开源项目托管站点推荐
- Visual Studio2005 GridView演示多层Demo研究心得
- 程序员:提高编程效率的技巧
- 为什么将dll的名字改了以后dll就不能用了?
- 【POJ分类】
- vsftp 配置文件解析
- 简单的新浪,搜狐手动发送邮件(破解版)
- 统计机器翻译工具