ChinaUnix.net
相关文章推荐:

pppoe getopt

我的pppoe-setup也不能运行,提示:synax error.我认为pppoe-setup运不运行没关系可以直接在pppoe.conf里改,问题是pppoe-start也不能正常运行。

by pangxiongqi - 服务器架设 - 2006-04-04 10:53:02 阅读(722) 回复(1)

相关讨论

OpenBSD 3.6  pppoe 配置 default:         set log Phase Chat LCP IPCP CCP tun command         #set log All -Debug -Timer         set redial 15 0         set reconnect 15 999999 pppoe:         set device "!/usr/sbin/pppoe ...

by building - BSD文档中心 - 2005-05-28 16:10:32 阅读(1099) 回复(0)

1. getopt的作用是用来解析命令行选项,譬如:>mysql -u lvdbing -p test -h 192.168.1.20 2. getopt提供的函数包括:Python 2.6.1+ (r261:67515, Mar 2 2009, 13:11:28) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import getopt >>> getopt.__all__ ['getoptError', 'error', 'getopt', 'gnu_getopt'] >>> 3. 帮助文档的例子:>>> s = '--condition=foo --testing ...

by lvDbing - Python文档中心 - 2009-05-28 21:13:16 阅读(3942) 回复(0)

linux 环境下 [code] stan@stan /temp $ ls -al echo.c -rw-r--r-- 1 stan users 300 2008-07-25 12:00 echo.c stan@stan /temp $ ls echo.c -al -rw-r--r-- 1 stan users 300 2008-07-25 12:00 echo.c [/code] 选项参数放在选项之前貌似也是可以的嘛!以前不都是要求选项参数放在选项之后,是否次序无所谓啊?这个功能是由getopt实现的吗? Thanks

by bcjrstan - C/C++ - 2008-07-28 00:35:46 阅读(1154) 回复(0)

getopt参数好像不能识别错误选项 比如有"abc:d:012" 我运行程序时./cmd -c -d 竞不报错,在shell中是报错的呀 说明已对?作过处理

by chzht001 - C/C++ - 2007-12-05 13:50:31 阅读(1057) 回复(0)

char *svalue=NULL; while((opt=getopt(argc,argv," :ls: ")!=-1)) . . . case 's': svalue=optarg; break; RUN: ./a -s file1 1.问题: 如果我想-s接收的是多个不定的参数请问怎么改呢? 如: -s file1 file2 或 -s file1 file2 file3 2.在书上看 opt=getopt(argc,argv," :ls::k ")!=-1 s后两个"::"表示接收两个参数?还是两个以上的参数呢?

by linuxcici - C/C++ - 2006-08-25 02:07:31 阅读(2420) 回复(4)

我在一本书上看到:如果getopt()找不到符合的参数则会印出错信息,并将全域变量optopt设为“?”字符。 但是程序显示好像不是这样:[code]#include; #include; extern char *optarg; extern int optind, optopt,opterr; int main(int argc,char **argv) { int ch; while((ch = getopt(argc,argv,"a:bcd")) != -1) switch(ch) { case 'a': printf("option a:'%s'\n",optarg); break; case 'b': pr...

by xueyan - C/C++ - 2005-04-20 13:18:03 阅读(976) 回复(2)

如何用getopt 获得这样的结果:ngrep port 5060

by mylover9989 - C/C++ - 2004-11-16 15:22:32 阅读(1253) 回复(6)

模块 getopt::Long 是怎么取参数后面的值?

by adminsinx - Perl - 2009-01-16 10:24:47 阅读(1526) 回复(1)

getopt分析命令行输入选项的时候,如果仅仅使用了long option,那么还需要给getopt指定-o '',否则getopt分析不到命令行输入 $getopt -l hello -- '--hello' -- $getopt -l hello -o '' -- '--hello' --hello --

by prc - Shell - 2008-12-29 15:36:48 阅读(2828) 回复(9)

#include #include #include int main(int argc, char *argv[]) { int c, flags = 0; while((c == getopt(argc, argv, "n")) != -1){ switch(c){ case 'n': flags = 1; break; } } printf("flags = %d\n", flags); ...

by xiaozhu2007 - C/C++ - 2008-07-18 23:34:05 阅读(1284) 回复(2)