朋友们,在
gnu.getopt.Getopt.jar
当我将 b* 作为选项参数时,我遇到了一些问题,然后它被当作 bin
Getopt g = new Getopt("cm_log_parser", args, "i:s"); //-D to enable debug log
while((opt = g.getopt()) != -1)
{
switch (opt)
{
case 'f'://To set file name(if above is not specified)
fileNameWithPath = getAndCheckOptArg(fFlag, opt, g);
fFlag = true;
break;
case 'p'://To set the pattern
String pattern = g.getOptarg();
hFlag = true;
break;
case '?':
usage("Invalid option" + opt + " option");
break;
}
}
当我指定-p "b*"
它是返回时bin
,为什么会这样?