码迷,mamicode.com
首页 >  
搜索关键字:awk sort    ( 17174个结果)
玩转 Shell 之:Shell 命令 Buffer 知多少?
1、问题: 下午有同学问了这么一个问题: tail -n +$(tail -n1 /root/tmp/n) -F /root/tmp/ip.txt 2>&1| awk ‘ARGIND==1{i=$0;next}{i++;if($0~/文件已截断/){i=0};print $1"---"i;print i >> "/root/tmp/n"}‘ /...
分类:系统相关   时间:2014-10-23 07:04:31    阅读次数:386
字符串排序
public class Test { public static void main(String[] args) { String[] array = {"D","B","A","C"}; //sort(array); shortStr("BDAC...
分类:编程语言   时间:2014-10-22 20:09:28    阅读次数:207
冒泡+快速+堆排序
package xie.struct;import java.util.ArrayList;public class Sort> { public static final int QuickSort = 1; public static final int SelectMin = 4;...
分类:编程语言   时间:2014-10-22 19:45:44    阅读次数:251
DEDE TAG调用方法大全
TAG是个好东西来的,相信老站长知道这个东西的好处,tag可以有效提高搜索引擎收录量,从而提高流量,那么DEDECMS里面的tag是怎么调用的呢?最新标签{dede:tagrow=‘30‘sort=‘new‘}[field:highlight/]([field:result/]){/dede:tag}当月热门标签{dede:tagrow=‘30‘sort=‘month‘}[fi..
分类:其他好文   时间:2014-10-22 18:31:40    阅读次数:402
VMware 总结安装脚本
###custconfigurations###P_SN=`esxclihardwareplatformget|grep"SerialNumber"|awk-F":"‘{print$NF}‘|sed‘s///g‘`P_NAME=`esxclihardwareplatformget|grep"ProductName"|awk-F":"‘{print$NF}‘`wgethttp://10.10.10.10/config/newserverLOCAL_IPADDR=`catnewserver|grep$P_SN|a..
分类:系统相关   时间:2014-10-22 18:29:40    阅读次数:708
批量ping测试脚本
ping测试脚本#!/bin/bash list=iplist.txt log=ping.log echo-n"">$log #清空历史日志 grep-v"#"$list|grep-v"^$">.list #从$list文件中读出ip地址列表,去掉包含#的行和空行,结果写入.list whilereadIP do echo"$IP`ping-s1000-f-c100$IP|greptransmitted|awk‘{print$6..
分类:其他好文   时间:2014-10-22 18:28:47    阅读次数:188
linux ps常用命令
1. linux下获取占用CPU资源最多的10个进程,可以使用如下命令组合:? ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head ? 2. linux下获取占用内存资源最多的10个进程,可以使用如下命令组合:? ?ps au...
分类:系统相关   时间:2014-10-22 14:46:23    阅读次数:200
一个简单的ns2实验全过程
实验名称:比较tcp和udp的丢包行为试验目的:1. 熟练用ns2做网络仿真试验的整个流程;2. 练习写tcl脚本,了解怎么应用http和rtp;3. 练习用awk处理trace数据,了解怎么计算丢包率;4. 练习用gnuplot绘制曲线图,熟练gnuplot的使用。实验步骤:1。确定网络拓扑。一个...
分类:其他好文   时间:2014-10-22 14:15:32    阅读次数:283
LeetCode 148 Sort List
Sort a linked list in O(n log n) time using constant space complexity. 思路:要想时间复杂度达到O(n log n) ,那么有两种,一种是合并排序,另一种是快速排序,而要想空间复杂度为常数,那么只能使用递归,本人使用的是递归的合并排序,代码如下: /** * Definition for s...
分类:其他好文   时间:2014-10-22 12:55:55    阅读次数:200
linux常用命令备忘
杀掉多个进程 ps -ef | grep tornado_service | grep -v grep | cut -c 9-15 | xargs kill -s 9 清空内存缓存 echo 3 > /proc/sys/vm/drop_caches 查找大文件或目录 du -s * | sort -...
分类:系统相关   时间:2014-10-21 21:05:20    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!