forked from erikaosgue/simple_shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathman_1_simple_shell
More file actions
executable file
·83 lines (63 loc) · 1.73 KB
/
man_1_simple_shell
File metadata and controls
executable file
·83 lines (63 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.\MANPAGE Simple Shell.
.TH Man Version 1 "16 april 2020" "1.0" "Simple Shell man page"
.SH NAME
.B shell -- command interpreter
.SH SYNOPSIS
.B ./shell
.SH DESCRIPTION
This is a simple UNIX command interpreter. The program has the same output as /bin/sh as well as the exact same error output. The only difference is when you print an error, the name of the program must be equivalent to your argv[0]. It contains basic features and functions found in other shell programs.
.SS Overview
The simple shell is an excutable that reads commands from prompt, interprets and execute them, and also execute some built-in.
.SS Path search
When locating a command, The shell first looks to see if it has a builtin command by that name.If the builtin function don't exist then it looks if exist a coincidence in the PATH of enviroment variable (env) by that name. Then append the command from prompt to PATH directory and return the entire Path.
.SS Running the program
It runs by compiling all .c files the repository simple_shell to create an executable called shell.
.SS
EXAMPLE OF COMPILATION:
gcc -Wall -Werror -Wextra -pedantic *.c -o shell
.SH MODES
INTERACTIVE MODE
.SS
EXAMPLE:
.br
$ ./shell
.br
myShell $ ls
.br
functions.c README.md shell.c
.br
_getenv.c shell shell.h _which
.br
myShell $ exit
.br
$
.br
NON-INTERACTIVE MODE
.SS
EXAMPLE:
.br
$ echo "ls" | ./shell
.br
functions.c README.md shell.c
.br
_getenv.c shell shell.h _which
.br
$
.br
.SH BUILT-IN COMMANDS AVALIBLE
.B env
- Prints enviroment
.br
.B exit
- exits the shell
.SH RETURN VALUE
Always 0.
.SH SEE ALSO INFORMATION IN:
.I sh(1)
.SH BUGS
No known bugs
.SH AUTHOR
Bryan Builes Echavarria --- 1482@holbertonschool.com
.br
Erika Osorio Guerrero --- 1476@holbertonschool.com
.br