【版权声明:转载请保留出处:blog.csdn.net/gentleliu。Mail:shallnew at 163 dot com】
上一节说到了grep命令,grep命令主要用在获取符合规则的行信息。本节要讲的awk在对某文件或字符串中获取指定文本域有较强大的功能。
a w k语言的最基本功能是在文件或字符串中基于指定规则浏览和抽取信息。 a w k抽取信息后,才能进行其他文本操作...
分类:
其他好文 时间:
2014-08-24 22:19:33
阅读次数:
190
cat /etc/vsftpd/vsftpd.conf |grep -v ‘^#‘;
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_form...
分类:
其他好文 时间:
2014-08-24 19:37:33
阅读次数:
278
+++++++++++++++++++++++++ +++++Shell编程+++++++++++++++++++++++++++++++1. 基础正则表达式 正则表达式与通配符: 正则表达式用来在文件中匹配符合条件的字符串,正则是包含匹配,grep awk sed等命令可以支持正则表达式...
分类:
系统相关 时间:
2014-08-24 09:07:12
阅读次数:
282
拆解脚本header_start=0header_len=15xref_start=$(strings -a -t d $1 | grep -e "\bxref\b" | awk '{print $1}')trailer_start=$(strings -a -t d $1 | grep -e "\...
分类:
其他好文 时间:
2014-08-23 22:49:01
阅读次数:
251
概述:CentOS 6.4下通过yum安装的MySQL是5.1版的,比较老,所以就想通过源代码安装高版本的5.6.14。正文:一:卸载旧版本使用下面的命令检查是否安装有MySQL Serverrpm -qa | grep mysql有的话通过下面的命令来卸载掉rpm -e mysql //普通删除模...
分类:
数据库 时间:
2014-08-23 15:15:00
阅读次数:
270
1 Depart Process: 2 1. Grep xref and trailer binary position in file. 3 2. Dump xref table and trailer part. 4 3. Calculate every object binary o...
分类:
其他好文 时间:
2014-08-22 19:36:19
阅读次数:
176
前几天碰到碰到一个线上redisCPU跑满的情况,基本无法处理正常请求了,刚开始以为是其他地方的问题,后来grep"Maxopenfiles"/proc/`pidofredis-server`/-r排查原来是启动redis的时候。ulimit-n只有1024,从而无法接受新连接。晚高峰时间段突发的大量请求导致redis连接数超过102..
分类:
其他好文 时间:
2014-08-22 18:00:59
阅读次数:
263
commons: all of them could use regular-expression to match the result. differences: 1)grep: search for files with patterns. 2)awk: any...
分类:
其他好文 时间:
2014-08-22 15:51:09
阅读次数:
224
shell脚本#! /bin/bashSHUTDOWN="/root/tomcat/bin/shutdown.sh"STARTTOMCAT="/root/tomcat/bin/startup.sh"echo "关闭tomcat"$SHUTDOWNps -ef |grep tomcat |grep /...
分类:
其他好文 时间:
2014-08-22 10:30:45
阅读次数:
160