This commit is contained in:
Jakub Adamski 2019-01-10 14:31:06 +01:00
parent aa11037bfc
commit b286c33f68

View File

@ -36,6 +36,7 @@ void cut(char **argv, char *command){
int main (){
char* argv[100];
int i;
while (1){
char komenda[max], directory[max];
if (getcwd(directory, sizeof(directory)) == NULL){
@ -45,6 +46,9 @@ int main (){
printf("[%s]$ ", directory);
fgets(komenda, max, stdin);
cut(argv, komenda);
for(i=0; i<5; i++)
printf("%c ", argv[0][i]);
printf("\n");
if (argv[0]==NULL)
continue;
else if (strcmp(argv[0], "exit") == 0)