if(aliasoption == 1) { strcpy(buff, "csh -c \"alias "); strcat(buff, command); strcat(buff, wordclose); /*printf("%s",final);*/ fp = popen(buff,"r"); if(fp == NULL) { printf("Handle Error"); } /*else printf("Opened\n"); printf("You asked for an alias\n");*/ printf("alias %s= ",command); while(fgets(buff,sizeof(buff),fp) != NULL) printf("%s",buff); pclose(fp); printf("\nNew Line"); }