输出匹配funcno或type:awk 'funcno|type'输出两次正则表达式匹配之间的行:awk '/funcno/, /type/'删除所有的空行:awk NF从第8行输出到第12行: awk 'NR==8,NR==12'标记:ARGC 命令行参数个数ARGV ...
分类:
其他好文 时间:
2015-05-25 18:21:10
阅读次数:
125
重要的命令行参数 当启动varnish时有两个重要的参数你必须设置: 一个是处理http请求的tcp监听端口,另一个是处理真实请求的后端server 如果你使用操作系统自带的包管理工具安装的varnish,你将在下面的文件找到启动...
分类:
其他好文 时间:
2015-05-24 17:35:09
阅读次数:
123
1, $*与$@区别cat a.sh#!/bin/bashfor i in $* #这里换成$@也是一样的结果doecho $idonesh a.sh 1 '2 3'123vi a.shfor i in "$*"...sh a.sh 1 '2 3'1 2 3vi a.shfor i in "$@"....
分类:
系统相关 时间:
2015-05-22 08:14:27
阅读次数:
112
getopts 命令用途处理命令行参数,并校验有效选项。语法getopts选项字符串名称[参数...]描述 getopts 的设计目标是在循环中运行,每次执行循环,getopts 就检查下一个命令行参数,并判断它是否合法。即检查参数是否以 - 开头,后面跟一个包含在 options 中的字母。如果是...
分类:
系统相关 时间:
2015-05-20 14:36:17
阅读次数:
223
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:
其他好文 时间:
2015-05-20 11:21:31
阅读次数:
157
Implementatoito convert a string to an integer.转换很简单,唯一的难点在于需要开率各种输入情况,例如空字符串,含有空格,字母等等。另外需在写的时候注意细节问题,完成后需要反复调试,整合。 1 public class Solution { 2 p...
分类:
其他好文 时间:
2015-05-18 18:38:57
阅读次数:
95
String to Integer (atoi)Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are th...
分类:
其他好文 时间:
2015-05-18 16:52:50
阅读次数:
125
视频分析模块主要包含两个函数,一个是VideoAnalysis::setup(....),其主要功能就是确定测试的视频是视频文件或摄像头输入亦或是采用命令行参数;第二个函数是VideoAnalysis::start(),其主要功能初始化视频处理、设置视频获取方式以及开始视频捕获功能等。1、Video...
分类:
其他好文 时间:
2015-05-18 14:41:59
阅读次数:
158
进程的基本环境
1、main主函数原型
int main( int argc, char *argv[]);
在exec函数执行main函数前,先调用一个特殊的启动例程,改启动例程为程序的起始地址,
目的是为了从内核获取进程的命令行参数和环境变量
2、进程的终止
终止进程的方法有好多种,常用的有
(1)从main返回
return 其实是调用exit函数。
exit函数执行标准I...
分类:
系统相关 时间:
2015-05-18 10:52:56
阅读次数:
120