#include #include int main(int argc, char *argv[]){ FILE *f,*f1; char c; if(argc<3){ printf("Nije dobar broj argumenata\n"); exit(EXIT_FAILURE); } f = fopen(argv[1],"r"); f1 = fopen(argv[2],"w"); if(f==NULL || f1==NULL){ printf("Otvaranje datoteke nije uspelo.\n"); exit(EXIT_FAILURE); } while((c=getc(f))!=EOF){ if(argc==4){ if(strcmp("-l",argv[3])==0) putc(tolower(c),f1); else if(strcmp("-u",argv[3])==0) putc(toupper(c),f1); }else{ printf("usao u granu\n"); putc(c,f1); } } fclose(f); fclose(f1); }