==
This commit is contained in:
parent
a8477db92b
commit
aa11037bfc
@ -29,7 +29,6 @@ void cut(char **argv, char *command){
|
|||||||
argument[x] = '\0';
|
argument[x] = '\0';
|
||||||
argv[w]=malloc(x+1 * sizeof(char));
|
argv[w]=malloc(x+1 * sizeof(char));
|
||||||
strcpy(argv[w], argument);
|
strcpy(argv[w], argument);
|
||||||
printf("\n%s\n", argv[w]);
|
|
||||||
w+=1;
|
w+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +47,7 @@ int main (){
|
|||||||
cut(argv, komenda);
|
cut(argv, komenda);
|
||||||
if (argv[0]==NULL)
|
if (argv[0]==NULL)
|
||||||
continue;
|
continue;
|
||||||
else if (!strcmp(argv[0], "exit"))
|
else if (strcmp(argv[0], "exit") == 0)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
if (fork() == 0)
|
if (fork() == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user