格式:awk‘{pattern+action}‘{filenames}常用参数:-F指定分割域符默认是以空格为分隔符BEGIN打印开头END打印信息尾内置变量ARGC命令行参数个数ARGV命令行参数排列ENVIRON支持队列中系统环境变量的使用FILENAMEawk浏览的文件名FNR浏览文件的记录数FS设置输入域分隔符,等价于-F..
分类:
其他好文 时间:
2014-09-24 17:32:27
阅读次数:
245
argc是命令行总的参数个数 argv[]是argc个参数,其中第0个参数是程序的全名,以后的参数 命令行后面跟的用户输入的参数,比如: int main(int argc, char* argv[]) { int i; for (i = 0; i>i; return 0; } 执行时敲入 F:\....
分类:
其他好文 时间:
2014-09-24 10:59:16
阅读次数:
265
#include #include #include #include using namespace std;int main(int argc, const char *argv[]){ //声明一个空的容器 vector svec; svec.push_back("HeNan...
分类:
其他好文 时间:
2014-09-24 00:28:05
阅读次数:
353
这篇我们讨论一下vector 自增长的体现 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main(int argc, const char *argv[]) 7 { 8 vector vec; 9 ...
分类:
编程语言 时间:
2014-09-23 02:15:23
阅读次数:
187
#!/usr/bin/expectset timeout 60if {$argc != 3} { send "usage followed by src,dst,password" exit}set src [lindex $argv 0]set dst [lindex ...
分类:
其他好文 时间:
2014-09-22 18:46:22
阅读次数:
186
二、通常的函数调用一个通常的函数调用的例子:/* 自行包含头文件 */void MyFun(int x); /* 此处的声明也可写成:void MyFun(int) */int main(int argc, char* argv[]){ MyFun(10); /* 这里是调用MyFun(10) 函数...
分类:
其他好文 时间:
2014-09-21 14:59:30
阅读次数:
250
如不做特殊说明,本博客所使用的 nginx 源码版本是 1.0.14我们先贴出 main 函数的部分代码: 205 int ngx_cdecl 206 main(int argc, char *const *argv) 207 { 208 ngx_int_t i; 209...
分类:
其他好文 时间:
2014-09-20 15:41:29
阅读次数:
391
main 入口参数:argc 和 argv#include void main (int argc, char **argv){ int i; printf("argc:%d\n",argc); for (i=0; i<argc; i++) printf("argv[...
分类:
其他好文 时间:
2014-09-20 01:02:26
阅读次数:
161
int main(int argc, const char * argv[]) { f(1,1,1000); return 0;}void f(int a,int b,int n){ if (a<n) { printf("%d\n",a); a=a+b; f(b,a,n);...
分类:
其他好文 时间:
2014-09-19 21:07:06
阅读次数:
168
上传文件:http://zengrong.net/post/2088.htm#include #include #include int main(int argc, char *argv[]){ CURL *curl; CURLcode res; struct curl_httppos...
分类:
其他好文 时间:
2014-09-19 19:18:05
阅读次数:
168