diff --git a/Microshell/help b/Microshell/help new file mode 100644 index 0000000..2319af2 --- /dev/null +++ b/Microshell/help @@ -0,0 +1,11 @@ + +Microshell Help +------------- +General info +Author= Jakub Adamski + +------------- +Working commands +help - manual +exit - ends microshell + diff --git a/Microshell/microshell b/Microshell/microshell index 23eac74..3e47d1e 100755 Binary files a/Microshell/microshell and b/Microshell/microshell differ diff --git a/Microshell/microshell.c b/Microshell/microshell.c index a168418..9bb3987 100644 --- a/Microshell/microshell.c +++ b/Microshell/microshell.c @@ -49,6 +49,15 @@ int main (){ ile = cut(argv, komenda); if (argv[0]==NULL) continue; + else if (!strcmp(argv[0], "help")){ + if (fork() == 0){ + execlp("cat", "cat", "help", NULL); + perror("execlp"); + exit(EXIT_FAILURE); + } + else + wait(NULL); + } else if (!strcmp(argv[0], "exit")) break; else