我的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 ...
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 ...
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
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后两个"::"表示接收两个参数?还是两个以上的参数呢?
我在一本书上看到:如果getopt()找不到符合的参数则会印出错信息,并将全域变量optopt设为“?”字符。
但是程序显示好像不是这样:[code]#include
getopt分析命令行输入选项的时候,如果仅仅使用了long option,那么还需要给getopt指定-o '',否则getopt分析不到命令行输入 $getopt -l hello -- '--hello' -- $getopt -l hello -o '' -- '--hello' --hello --
#include