码迷,mamicode.com
首页 >  
搜索关键字:argv    ( 3650个结果
(转)awk实例练习(二)
文章转自http://www.cnblogs.com/zhuyp1015/archive/2012/07/14/2591842.html先来总结一下awk内置变量:ARGC 命令行参数个数ARGV 命令行参数排列ENVIRON 支持队列中系统环境变量的使用FILENAME ...
分类:其他好文   时间:2015-06-28 12:32:24    阅读次数:103
getenv和putenv在获取和设置环境变量中的使用
1 #include 2 #include 3 #include 4 /* 5 这个函数是对环境变量进行一些操作的 6 */ 7 int main(int argc, char * argv[]) //主函数 8 { 9 char * var, * value; ...
分类:其他好文   时间:2015-06-26 17:56:31    阅读次数:263
十六进制转换为点分十进制串(ip地址形式)
include?"csapp.h" void?main(int?argc,char*?argv[]) { ??char?*hex=argv[1]; ??if(argc<2||*hex!=‘0‘||*(hex+1)!=‘x‘) ????printf("input?error!you?should?input?like?this:%s?0x8002c2f...
分类:其他好文   时间:2015-06-25 19:46:29    阅读次数:211
两个数求最大值------函数的模板
#includeusing namespace std;template T max(T a, T b){ return a > b ? a : b;}int main(int argc,char* argv[]){ int x = 10; int y = 20; cout > x; return ...
分类:其他好文   时间:2015-06-25 19:16:51    阅读次数:111
免密码登录服务器python脚本
在自动化运维平台没有做完之前,常需要登录服务器做很多维护操作,每次找好长好长的密码,那么多服务器,你会疯掉的,所以瞎搞了以下脚本.先解一下燃眉之急,哈哈cat login_root.exp#!/usr/bin/expect -cset IP [lindex $argv 0]set PWD [lind...
分类:编程语言   时间:2015-06-25 00:04:42    阅读次数:174
OC-归档和解归档
1 //归档:将对象数据存储到文件的过程 NSArchiver 2 //反归档:从文件中读取数据到对象中的过程 3 4 int main(int argc, const char * argv[]) { 5 @autoreleasepool { 6 7 ...
分类:其他好文   时间:2015-06-24 10:51:54    阅读次数:117
第二十三章,(C++ primer笔记)string的理解(C++)
demo01: #include int main(int argc, char** argv) { std::string line; //存string的size用size_type这个类型 std::string::size_type st; std::cout<<"请输入内容(按“回车键”结束):"<<std::endl; //获取一行数据 getl...
分类:编程语言   时间:2015-06-23 18:07:50    阅读次数:139
C语言的基本输入与输出函数
C语言中最常用最基础的输入输出函数:printf() 和 scanf();例子:#import int main(int argc, const char * argv[]) { int num = 0; printf("请输入一个整数数字按回车键结束: "); scanf("%d",&num); ...
分类:编程语言   时间:2015-06-23 15:05:39    阅读次数:130
毕业课题---之ostu算法二值化
二值化ostu算法: #include "stdafx.h" #include   #include   #include   #include   int Otsu(IplImage* src);      int _tmain(int argc, _TCHAR* argv[])   {       IplImage* img = cvLoadImage("L...
分类:编程语言   时间:2015-06-23 13:36:18    阅读次数:131
经典范例:文件的复制
#include#include#include#include#include#include#define BUFFER_SIZE 1024int main(int argc ,char **argv){ int from_fd,to_fd; int bytes_read,bytes...
分类:其他好文   时间:2015-06-22 22:03:30    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!