码迷,mamicode.com
首页 >  
搜索关键字:awk sort    ( 17174个结果)
shell中数学表达式的计算示例一
数学表达式的计算示例: root@Storage:/mnt/mtd# cat rss.sh #!/bin/sh while true do cat /proc/2409/stat |awk -F" " '{print $24}' rss=`cat /proc/2409/stat |awk -F" " '{print $24}'` page=4096 echo rss=$[$pa...
分类:系统相关   时间:2014-11-26 11:24:11    阅读次数:207
mysql如何做order by
ORDER BY Clauses In general, the optimizer will skip the sort procedure for the ORDER BY clause if it sees that the rows will be in order anyway. But let's examine some exceptional situations. Fo...
分类:数据库   时间:2014-11-26 11:19:42    阅读次数:229
用户安全
?? 1、使无需登录的用户不能登录  passwd -l username 2、修改/ect/passwd中的shell环境为nologin 3、使用强壮密码  检查空密码用户  cat /etc/shadow | awk -F: 'length($2)  设置密码策略  chage [option] username 4、john the ripper 破解/etc/shado...
分类:其他好文   时间:2014-11-26 06:42:47    阅读次数:209
【排序】归并排序+逆序对应用
1 void merge_sort(int *A, int x, int y, int *T) 2 {//x为左端点,y为右端点 3 // 4 if(y-x= y) || (p = m || A[p] > A[q]时,将右半数组元素复制到临时空间19 T[i...
分类:编程语言   时间:2014-11-25 23:26:45    阅读次数:298
无限分级Repeater递归实现:读取一次数据库,使用LINQ2SQL技术,支持排序&显示隐藏
预览效果图: Selenium 数据库结构:id(int) classname(string) parentid(int) sort(int用于显示与排序)1 家居 0 12 家电 0 23 沙发 1 14 某... 3 1...10 ...红色 4 1注:parentid 父...
分类:数据库   时间:2014-11-25 22:43:12    阅读次数:287
Leetcode: Insertion Sort List
Sort a linked list using insertion sort.分析:insertion sort是将当前元素插入到已经排好序的元素的适当位置,时间复杂度为O(n^2)。class Solution {public: ListNode *insertionSortList(Li...
分类:其他好文   时间:2014-11-25 20:23:53    阅读次数:142
awk grep sed
awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再进行各种分析处理。last -n5|awk '{print $1}' #last -4 也行cat /etc/passwd |awk -F ':' '{print $1}' #等于 cat /etc/passwd |cut -d'...
分类:其他好文   时间:2014-11-25 20:20:09    阅读次数:216
[Linux]去除重复行
文本处理时,经常要删除重复行,下面是三种方法? 第一,用sort+uniq,注意,单纯uniq是不行的。 sort -n test.txt | uniq 第二,用sort+awk命令,注意,单纯awk同样不行,原因同上。 [zhangy@BlackGhost ~]$ uni...
分类:系统相关   时间:2014-11-25 19:09:10    阅读次数:197
linux 只列出目录及文件
只列出目录:1.ls-F|grep‘/$‘2.ls-d*/3.ls-l|grep‘^d‘4.find.-typed-maxdepth1只列出文件:ls-l|grep^-|awk‘{printf("%s\n",$9)}‘
分类:系统相关   时间:2014-11-25 19:06:17    阅读次数:153
Java 对集合进行排序
public List compareTo(List<Object> result)throws Exception{ Collections.sort(result,new Comparator<Object>(){ public int compare(Object arg0, Object arg1) { if(arg0.getNumbe...
分类:编程语言   时间:2014-11-25 16:41:09    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!