-
Notifications
You must be signed in to change notification settings - Fork 0
/
man_1_simple_shell
executable file
·137 lines (77 loc) · 3.48 KB
/
man_1_simple_shell
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.TH SIMPLE_SHELL 1 "AUGUST 2020" "Version 1.0" "SHELL General Comands Manual"
.SH NAME
.B Simple Shell
- Command interpreter
.SH SYNOPSIS
.B [Command] [-OPTIONS] [FILE]
.SH DESCRIPTION
.B Simple Shell
- Is an interpreter of commands for Linux. It is similar to the functionality of sh, together with its outputs and errors.
.Nm ./hsh
.PP
In the interactive mode it will increment the line counter, if a command cannot be found or executed it will return the line counter, and the respective error message immediately and if it can be executed it will also increment a line counter that is only shown in cases of error.
also works in non-interactive mode, this means that when the command is sent it will be executed and you will immediately exit our program
.SH RETURN VALUE
If everything was successful our return 0 program.
.SH OPTIONS
.B [^C]
this is printed on the screen
.B [^D]
- this makes a clean exit from our progr
.B [exit]
- exits the shell
.SH ENVIRONMENT
It automatically searches you local PATH variable and sets it.
.SH EXIT STATUS
It conforms to the standard error codes of Linux, we talk about the POSIX.
.SH EXAMPLES
.B $ls
_array_this.c _concat.c _getenv.c man_1_simple_shell README.md shell.c _strcpy.c
AUTHORS error.c _itoa.c minishell.h _searchpath.c _strcmp.c _strdup.c
.B $/bin/ls
_array_this.c _concat.c _getenv.c man_1_simple_shell README.md shell.c _strcpy.c
AUTHORS error.c _itoa.c minishell.h _searchpath.c _strcmp.c _strdup.c
.B $ls -l
total 72
-rwxrwxr-x 1 vagrant vagrant 14169 Aug 18 19:50 a.out
-rw-rw-r-- 1 vagrant vagrant 432 Aug 18 02:10 _array_this.c
-rw-rw-r-- 1 vagrant vagrant 313 Aug 18 16:11 AUTHORS
-rw-rw-r-- 1 vagrant vagrant 719 Aug 18 01:27 _concat.c
-rw-rw-r-- 1 vagrant vagrant 652 Aug 18 00:17 error.c
-rw-rw-r-- 1 vagrant vagrant 687 Aug 18 16:11 _getenv.c
-rw-rw-r-- 1 vagrant vagrant 551 Aug 17 22:45 _itoa.c
-rwxrwxr-x 1 vagrant vagrant 1559 Aug 18 19:48 man_1_simple_shell
-rw-rw-r-- 1 vagrant vagrant 671 Aug 18 01:40 minishell.h
-rw-rw-r-- 1 vagrant vagrant 70 Aug 14 15:28 README.md
-rw-rw-r-- 1 vagrant vagrant 800 Aug 18 03:54 _searchpath.c
-rw-rw-r-- 1 vagrant vagrant 1511 Aug 18 16:11 shell.c
-rw-rw-r-- 1 vagrant vagrant 371 Aug 17 22:48 _strcmp.c
-rw-rw-r-- 1 vagrant vagrant 327 Aug 18 16:11 _strcpy.c
-rw-rw-r-- 1 vagrant vagrant 442 Aug 18 16:11 _strdup.c
.B $/bin/ls -l
total 72
-rwxrwxr-x 1 vagrant vagrant 14169 Aug 18 19:50 a.out
-rw-rw-r-- 1 vagrant vagrant 432 Aug 18 02:10 _array_this.c
-rw-rw-r-- 1 vagrant vagrant 313 Aug 18 16:11 AUTHORS
-rw-rw-r-- 1 vagrant vagrant 719 Aug 18 01:27 _concat.c
-rw-rw-r-- 1 vagrant vagrant 652 Aug 18 00:17 error.c
-rw-rw-r-- 1 vagrant vagrant 687 Aug 18 16:11 _getenv.c
-rw-rw-r-- 1 vagrant vagrant 551 Aug 17 22:45 _itoa.c
-rwxrwxr-x 1 vagrant vagrant 1559 Aug 18 19:48 man_1_simple_shell
-rw-rw-r-- 1 vagrant vagrant 671 Aug 18 01:40 minishell.h
-rw-rw-r-- 1 vagrant vagrant 70 Aug 14 15:28 README.md
-rw-rw-r-- 1 vagrant vagrant 800 Aug 18 03:54 _searchpath.c
-rw-rw-r-- 1 vagrant vagrant 1511 Aug 18 16:11 shell.c
-rw-rw-r-- 1 vagrant vagrant 371 Aug 17 22:48 _strcmp.c
-rw-rw-r-- 1 vagrant vagrant 327 Aug 18 16:11 _strcpy.c
-rw-rw-r-- 1 vagrant vagrant 442 Aug 18 16:11 _strdup.c
.SH SEE ALSO
sh(1)
.SH BUGS
unknowns
.SH AUTHORS
.NM
.PP
Santiago Pinzon Dominguez - https://github.com/santiagoPinzonD
.PP
Julian Alvarez Caro - https://github.com/julianalvarezcaro