#include ; #include ; #include ; #include ; #include ; #include ; void main(int argc,char *argv[]){ char buf[257],cmd[257],filename[257],keyword[257],keyword2[257]; if(argc<3){ printf("**********************************\n"); printf("** Order Form for Command Line. **\n"); printf("** Please tune next sample. ******\n"); printf("**********************************\n"); printf("Usage : pdosus EZ filename.txt keyword \n"); printf("\n"); printf("Usage : pdosus TR filename.txt keyword1 kewword2 \n"); printf("**********************************\n"); printf("** Please write correctly. ******\n"); printf("**********************************\n"); exit(1);} system("cleanup 20"); printf("Before files sweeped.\n"); system("pause"); sprintf(buf,"ref %s %s",argv[2],argv[3]); system(buf); char checkcmd[257]; strcpy(checkcmd,argv[1]); if((checkcmd[0]=='E')||(checkcmd[0]=='e')){ sprintf(buf,"ez temp.txt %s",argv[3] ); system(buf); } if((checkcmd[0]=='T')||(checkcmd[0]=='t')){ sprintf(buf,"tr temp.txt %s %s\n",argv[3],argv[4]); system(buf); } /* REF filename EZ TEMP.TXT keyword REF filename TR TEMP.TXT keyword keyword2 ;*/ printf("Process Finished.\n"); system("del temp.txt"); system("dir *.txt | more"); system("pause\n"); exit(1); /*===================================================;*/ }