dodanie help
This commit is contained in:
parent
036657c077
commit
d41781b2c7
11
Microshell/help
Normal file
11
Microshell/help
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
Microshell Help
|
||||||
|
-------------
|
||||||
|
General info
|
||||||
|
Author= Jakub Adamski
|
||||||
|
|
||||||
|
-------------
|
||||||
|
Working commands
|
||||||
|
help - manual
|
||||||
|
exit - ends microshell
|
||||||
|
|
Binary file not shown.
@ -49,6 +49,15 @@ int main (){
|
|||||||
ile = cut(argv, komenda);
|
ile = cut(argv, komenda);
|
||||||
if (argv[0]==NULL)
|
if (argv[0]==NULL)
|
||||||
continue;
|
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"))
|
else if (!strcmp(argv[0], "exit"))
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user