码迷,mamicode.com
首页 >  
搜索关键字:awk sort    ( 17174个结果)
用于拆解和组合PDF中各个对象的shell脚本
拆解脚本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
python排序
import mathclass sort: def selectSort(self, L): size = len(L) for i in range(0, size): max = L[i] index = i ...
分类:编程语言   时间:2014-08-23 22:48:11    阅读次数:205
LINUX - awk命令之NF和$NF区别
NF和$NF 区别问答:1.awk中$NF是什么意思?#pwd/usr/local/etc~# echo $PWD | awk -F/ '{print $NF}'etcNF代表:浏览记录的域的个数$NF代表:最后一个Field(列)2.awk下面的变量NF和$NF有什么区别?{print NF} 也...
分类:系统相关   时间:2014-08-23 15:07:20    阅读次数:317
awk实用小技巧
awk‘NF‘过滤空白行awk‘!a[$0]++‘过滤重复行awk‘NF-=2‘过滤掉最后两列awk‘a=!a‘打印奇数行awk‘!(a=!a)‘打印偶数行awk‘END{printNR}‘模拟wc-lawk‘BEGIN{print"‘\‘‘"}‘打印单引号,print后边依次为:双引号单引号转义单引号单引号双引号awk‘BEGIN{print"\""}‘打印双引号,print后..
分类:其他好文   时间:2014-08-23 02:26:00    阅读次数:196
2014.8.22
技术: Linux命令 sed awk http://blog.csdn.net/a81895898/article/details/8482333 RESTFul SOAP 区别 http://www.blogjava.net/diggbag/articles/361703.html
分类:其他好文   时间:2014-08-22 23:46:21    阅读次数:228
C#里List.Sort的用法
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace ListSort{ class Program { static void Main(s...
分类:其他好文   时间:2014-08-22 23:43:59    阅读次数:233
Java 全排列
package algorithm; public class SortAll { public static void main(String[] args) { char buf[] = {'1','2','3','4','5'}; perm(buf,0,buf.length-1); } private static void perm(char[] buf, int sta...
分类:编程语言   时间:2014-08-22 17:56:39    阅读次数:233
grep,awk和sed
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
awk数组用法
两个文件,从文件b首列查找出等于文件a的行并输出[root@localhost~]#cata1367[root@localhost~]#catb123234345456567678789shell脚本[root@localhost~]#catjieguo#!/bin/bashy=`sed-n‘p‘a|wc-l`#a行数x=`sed-n‘p‘b|wc-l`#b行数for((i=1;i<=$y;i++))dovalue_a=`sed-n${i}pa`#..
分类:其他好文   时间:2014-08-21 19:37:17    阅读次数:197
看我linux如何防SYN攻击
[root@web~]#netstat-anp|awk‘{print$6}‘|sort|uniq-c|sort-rn172ESTABLISHED59CONNECTED589SYN_RECV15STREAMSYN居然这么高,继续追查是那些ip发出的SYN:[root@tweb~]#netstat-an|grepSYN|awk‘{print$5}‘|awk-F:‘{print$1}‘|sort|uniq-c|sort-nr|more570x.x.x.x(ip就不写出了..
分类:系统相关   时间:2014-08-21 19:35:16    阅读次数:305
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!