diff --git a/Microshell/microshell.c b/Microshell/microshell.c index a520211..f79875a 100644 --- a/Microshell/microshell.c +++ b/Microshell/microshell.c @@ -42,13 +42,12 @@ int main (){ } printf("[%s]$ ", directory); fgets(komenda, max, stdin); + cut(argv, komenda); if (!strcmp(komenda, "exit\n")) break; - else{ - cut(argv, komenda); + else execvp(argv[0], argv); - } } return 0; }