getopt optarg
来源:互联网 发布:usb转网络接口装驱动 编辑:程序博客网 时间:2024/05/18 01:45
[krocp@sdnmanager codes]$ vim getopt.c#include <stdio.h>#include <unistd.h>int main(int argc, char **argv){ int ch; opterr = 0; while ((ch = getopt(argc,argv,"a:bcde"))!=-1) { switch(ch) { case 'a': printf("option a:'%s'\n",optarg); break; case 'b': printf("option b :b\n"); break; default: printf("other option :%c\n",ch); } } printf("optopt +%c\n",optopt);}
运行结果:
[krocp@sdnmanager codes]$ ./getopt -c -a sdafasfdother option :coption a:'sdafasfd'
阅读全文
0 0
- getopt optarg
- getopt 详解 getopt与optarg
- getopt 详解 getopt与optarg
- getopt与optarg
- getopt, optarg, optind, opterr, optopt
- getopt的用法与optarg
- getopt的用法与optarg
- getopt的用法与optarg
- getopt的用法与optarg
- getopt的用法与optarg(转)
- 使用 getopt() 进行命令行处理,optind,optarg,optopt
- Unix——optarg与getopt的用法
- getopt
- getopt
- getopt
- getopt
- getopt
- getopt
- MVVM的简单使用流程
- 逻辑思维
- linux 安装部署多个tomcat
- org.apache.cxf.interceptor.Fault: Unmarshalling Error: 意外的元素 (uri:"", local:"action")
- [科普]DNS预解析/dns-prefetch是什么?怎么开启?
- getopt optarg
- Android 4.4.2引入的超炫动画库
- ACM-ICPC北京赛区网络赛2017-minimum(线段树)
- Tesseract-OCR学习系列(三)简例
- JDK1.7和1.8中List集合中sort方法排序问题【JAVA】
- android5.0之后不允许使用隐式Intent启动Service
- caffe学习日记--lesson3:win8系统,VS2013下的caffe工程编译探究
- ArcGIS for Android Runtime100 基本操作(六)——移动地图包MMPK的使用
- PL/SQL备份数据库详解