This commit is contained in:
Jakub Adamski 2019-01-10 13:17:30 +01:00
parent 4315a84f02
commit 5b566ee326

View File

@ -42,13 +42,12 @@ int main (){
} }
printf("[%s]$ ", directory); printf("[%s]$ ", directory);
fgets(komenda, max, stdin); fgets(komenda, max, stdin);
cut(argv, komenda);
if (!strcmp(komenda, "exit\n")) if (!strcmp(komenda, "exit\n"))
break; break;
else{ else
cut(argv, komenda);
execvp(argv[0], argv); execvp(argv[0], argv);
} }
}
return 0; return 0;
} }