2015年1月15日
摘要: 条件 匹配 打印含关键字的行ps aux | sort -k 4 -r | awk '$4 ~ /^[0-9]/ && $4>0 {print $4,$11}'zzx@zzx134:~$ ll |awk '$5>102400 {print $9}' #打印大小大于100k的文件名zzx@zzx120... 阅读全文
posted @ 2015-01-15 16:22 寒星12345678999 阅读(331) 评论(7) 推荐(0) 编辑
摘要: zzx@zzx120:~/test1$ catfile.txt 1122zzx@zzx120:~/test1$ cat ./read.sh #!/bin/bashwhile read linedo#echo "hello"echo $linedone < file.txtzzx@zzx120:~/t... 阅读全文
posted @ 2015-01-15 15:28 寒星12345678999 阅读(542) 评论(0) 推荐(0) 编辑
摘要: 一,RS与ORS1,RS是记录分隔符,默认的分隔符是\n,具体用法看下查看复制打印?[root@krlcgcms01mytest]#cattest1//测试文件1112223334445556662,RS默认分割符\n查看复制打印?[root@krlcgcms01mytest]#awk'{print... 阅读全文
posted @ 2015-01-15 14:26 寒星12345678999 阅读(401) 评论(1) 推荐(0) 编辑
摘要: 1.要求分析Apache访问日志,找出里面数量在前面100位的ip数.日志大约在78M左右.一下是apache日志文件节选(其中日志access.log):218.107.27.137 .....202.112.32.22 ....[26/Mar/2006:23:59:55 +0800]......... 阅读全文
posted @ 2015-01-15 11:53 寒星12345678999 阅读(137) 评论(0) 推荐(0) 编辑