From 5b566ee32692365acaf919bd634a221acbeca98f Mon Sep 17 00:00:00 2001 From: Jakub Adamski Date: Thu, 10 Jan 2019 13:17:30 +0100 Subject: [PATCH] pop --- Microshell/microshell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; }