码迷,mamicode.com
首页 >  
搜索关键字:awk sort    ( 17174个结果)
实时监控Linux服务器用户操作命令
在/etc/profile追加exportHISTORY_FILE=/var/log/history/userhistory.log readonlyPROMPT_COMMAND=‘{date"+%y-%m-%d%T#####$(whoami|awk"{print\$1\"\"\$2\"\"\$NF}")####$(id|awk"{print\$1}")####$(history1|{readxcmd;echo"$cmd";})";}>>$HISTORY_FILE‘重读source/et..
分类:系统相关   时间:2014-07-24 23:54:14    阅读次数:281
hdu--1029--思维题
这题 可能是数据不够大的原因吧 一开始我直接sort一遍也过了...这题 在一天一道算法题里曾经出现过.. touch meO(n)时间复杂度的思想 很cool 1 /* 2 #include 3 using namespace std; 4 5 int arr[1000000]; 6 i...
分类:其他好文   时间:2014-07-24 22:50:33    阅读次数:270
hdu 1236 排名
http://acm.hdu.edu.cn/showproblem.php?pid=1236自己写的comp,终于勉强算是掌握sort()了...囧...继续努力~ 1 #include 2 #include 3 #include 4 using namespace std; 5 struct S....
分类:其他好文   时间:2014-07-24 22:22:22    阅读次数:298
【SAS BASE】PROC SORT
1 PROC SORT DATA=data-set2 OUT=neat 3 NODUPKEY4 DUPOUT=extraobs;5 BY variable-1 variable-2 ...
分类:其他好文   时间:2014-07-24 21:49:12    阅读次数:301
编写Linux脚本
一下是重启Linux下某进程的shell脚本,以tomcat进程为例: #!/bin/sh pid=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'` if [ "$pid" = "" ] ; then echo "tomcat service does not start!" else kill -9 $pid pi...
分类:系统相关   时间:2014-07-24 10:28:03    阅读次数:251
Java Sort算法
//插入排序:package org.rut.util.algorithm.support;import org.rut.util.algorithm.SortUtil;/*** @author treeroot* @since 2006-2-2* @version 1.0*/public clas...
分类:编程语言   时间:2014-07-24 00:53:17    阅读次数:504
多线程程序 怎样查看每个线程的cpu占用
可以用下面的命令将 cpu 占用率高的线程找出来:ps H -eo user,pid,ppid,tid,time,%cpu,cmd --sort=%cpu这个命令首先指定参数'H',显示线程相关的信息,格式输出中包含:user,pid,ppid,tid,time,%cpu,cmd,然后再用%cpu字...
分类:编程语言   时间:2014-07-23 20:46:15    阅读次数:529
Effective Go -> Interface
1.接口实现及类型转换 1 type Sequence []int 2 3 // Methods required by sort.Interface. 4 func (s Sequence) Len() int { 5 return len(s) 6 } 7 func (s Sequen...
分类:其他好文   时间:2014-07-23 16:43:41    阅读次数:210
从最简单的vector中sort用法到自定义比较函数comp后对结构体排序的sort算法
sort函数在使用中非常好用,也非常简单,而且效率与冒泡或者选择排序不是一个数量级。本文就sort函数在vector中的用法分为sort函数入门用法与自定义comp比较函数比较结构体这两个最基本的功能讲讲其用法:1、sort入门:使用sort需要包含algorithm头文件,完整代码如下#inclu...
分类:其他好文   时间:2014-07-23 16:28:11    阅读次数:202
shell脚本报错:"[: =: unary operator expected"
shell脚本报错:"[:=:unaryoperatorexpected"md5_109a="81ab961153b62d207f0f517048881b5d"md5_109b=`md5suminstall.bin|awk‘{print$1}‘`if[$md5_109a!=$md5_109b]原因,当文件install.bin不存在时,$md5_109b为空这样对比字符串就变成了if[81ab961153b62d207f0f517048881b5d!..
分类:其他好文   时间:2014-07-23 00:20:38    阅读次数:211
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!