awk 学习笔记
最近添加了几个功能的日志,但是呢,这个日志就是输出,一般自己也发现不了问题,于是想写一些简单的监控脚本来看看日志的大致情况,
比如有没有error,每天有多少error报出来。 想到了以前运维的同时分享awk,于是想简单的学习下。
入门
最简单的输入某些列 使用$4 这种来表示 __$0__是输出整列
[root]/root/test$ps -ef|grep...
分类:
系统相关 时间:
2014-08-03 15:24:35
阅读次数:
368
题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the....
分类:
编程语言 时间:
2014-08-03 04:40:04
阅读次数:
351
序号任务命令组合1删除0字节文件find . -type f -size 0 -exec rm -rf {} \;find . type f -size 0 -delete2查看进程,按内存从大到小排列ps -e -o “%C : %p : %z : %a”|sort -k5 -nr3按cpu利用率...
分类:
系统相关 时间:
2014-08-02 23:17:54
阅读次数:
341
题目地址:HDU 1242
这个题相比于普通的bfs有个特殊的地方,经过士兵时会额外消耗时间,也就是说此时最先搜到的时候不一定是用时最短的了。需要全部搜一遍才可以。这时候优先队列的好处就显现出来了。利用优先队列,可以让队列中的元素按时间排序,让先出来的总是时间短的,这样的话,最先搜到的一定是时间短的,就不用全部搜一遍了。PS:我是为了学优先队列做的这题。。不是为了这题而现学的优先队列。。
代码...
分类:
其他好文 时间:
2014-08-02 20:59:44
阅读次数:
245
Description
Emma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they onl...
分类:
其他好文 时间:
2014-08-02 18:26:23
阅读次数:
312
题目链接:uva 10743 - Blocks on Blocks
题目大意:问说n联骨牌有多少种,旋转镜像后相同不算同一组,一行的格子必须连续,如果答案大于10000,输出后四位。
解题思路:想了一下午的递推式,实在受不了,把推出的序列在网上搜了一下,有公式ai=5?ai?1?7?ai?2+4?ai?3
(i≥5)
PS:哪位神人知道怎么推出来的请留言我,大恩不言谢~
#...
分类:
其他好文 时间:
2014-08-02 12:57:43
阅读次数:
227
题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at a....
分类:
编程语言 时间:
2014-08-02 12:17:23
阅读次数:
279
First I implemented it by QuickSort, but got a TLE:class Solution {public: struct Pair { Pair(ListNode *pS, ListNode *pE) : pStart(pS), p...
分类:
其他好文 时间:
2014-08-02 05:04:32
阅读次数:
233
今天是在吾索实习的第18天。我主要学习了如何在ASP.NET中对SQLite数据库的操作,其基本操作如下:添加引用System.Data.SQLite.dll(PS:在网页里面任意找到适合的.NET Framework版本与位数所对应的压缩包,里面就会有该文件了)。在所在cs文件中加入using.....
分类:
数据库 时间:
2014-08-02 01:48:46
阅读次数:
258