while((ch=getopt(argc, argv, "X:Y:C:")) != EOF) { switch((char)ch) { case 'X': strcpy(strSection, optarg); break; case 'Y': strcpy(strInstId, optarg); break; case 'C': strcpy(strSysId, optarg);//LogFile Name 会用 ELR,ELRQ,ELRC,ELR2 break; exit(O); } } // Check the input parameter does exist or not