-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathman_1_simple_shell
executable file
·138 lines (90 loc) · 2.66 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 man "04/23/2024" "1.0" "simple_shell man page"
.TH simple_shell 1 "04/23/2024" "1.0" "simple_shell man page"
.SH NAME
simple_shell \- A simple Unix shell program
.BR DESCRIPTION
[This is an interaction example image of our shell.](ShellExample.png)(https://github.com/Luismarrer/holbertonschool-simple_shell/blob/main/ShellExample.png)
.PP
The simple_shell program is a basic Unix shell that provides a command-line
interface for users to execute commands. It reads commands from the standard
input and executes them.
.BR OPTIONS
OPTIONS
This program does not accept any command-line options.
.SY
COMMANDS
The following commands are supported:
.BR
exit - EXIT the shell
Any other command entered will be executed as a system command.
.SY
.BR
PROMPT
The default prompt for simple_shell is "cisfun". This indicates that it is
ready to receive commands from the user.
.BR
LIBRARY
The header file simple_shell.h provides the function declarations and
structure definitions necessary for the proper functioning of simple_shell.
#include <simple_shell.h>
.BR
PATH OF SHELL COMMANDS
The path of shell commands is defined as the list of directories where
simple_shell looks for executable binaries of commands entered by the user.
These directories are specified in the PATH environment variable.
For example:
PATH=/bin:/usr/bin:/usr/local/bin
In this case, simple_shell will look for executable binaries of commands in
the directories /bin, /usr/bin, and /usr/local/bin, in that order.
`
.BR
ENVIRONMENT
Environment variables are commonly used for configuration,
such as specifying paths, credentials or other settings that may vary between different environments
(like development, testing, and production)
.PP
.BR
The simple_shell program uses the following environment variables:
PATH - A colon-separated list of directories in which the shell looks
for executable files.
.SH COMPLITAION
.BR
-gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
.SH
TESTING
.BR
Interactive mode:
$ ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
$
.SH
.BR
-non-intactactive
$ echo "/bin/ls" | ./hsh
hsh main.c shell.c test_ls_2
$
$ cat test_ls_2
/bin/ls
/bin/ls
$
$ cat test_ls_2 | ./hsh
hsh main.c shell.c test_ls_2
hsh main.c shell.c test_ls_2
$
.SH AUTHORS
Written by:
.LP
Luis Marrero <https://github.com/luismarrer>
.LP
Emmanuel Torres <https://github.com/Emahnny>
.LP
Nissel Sanchez <https://github.com/niniisg>
.BR Reporting Bugs
Report bugs to:
.LP
Luis Marrero <https://github.com/Luismarrer>, Emmanuel Torres <https://github.com/Emahnny>, Nissel Sanchez <https://github.com/niniisg>
.SH VERSION
This manual page corresponds to version 1.0 of the simple_shell program.