-
Notifications
You must be signed in to change notification settings - Fork 24
/
man_1_simple_shell
executable file
·78 lines (78 loc) · 1.85 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
.TH SHELL 1 "27 November 2019" GNU "Shell man page"
.SH NAME
.B hsh
- Command line interpreter (shell)
.SH SYNOPSIS
The shell is executed by typing ./hsh
.br
Then, it will wait for an input such as : command [arguments] [other]
.SH DESCRIPTION
This shell is a project dedicated to our studies. My partner and I, have tried to mimic the behavior of a real shell. In case you don't know what a shell is (I doubt that) here is a brief explanation. A shell is a command language interpreter that executes commands read from the standard input or from a file. Our shell does not support the arguments passed to it, yet. We are still working on it.
.br
.B What hsh can do :
.br
- Executes any command with its arguments
.br
- Executes built-in commands
.br
- Handle pipes
.br
- Handle the command seperator ;
.br
- Handle && and || logical operators
.br
- handle variable replacement
.br
- handle the $? variable
.br
- handle the $$ variable
.SH BUILT-IN FUNCTIONS
Those are the available built-in functions :
.br
- exit : exit the shell
.br
- cd : Change Directory
.br
- help : Display the help page
.br
- history : Display history of commands used
.br
- alias : Put an alias for a command
.br
- env : Display the environment variables
.SH OPTIONS
There are no options for the moment.
.SH EXIT STATUS
The exit value depends on how a function has terminated. Every error is identified by a certain value. On success it will always return 0.
.SH RETURN VALUE
Return 0 on success, otherwise it will return the exit value.
.SH ENVIRONMENT
- PATH
.br
- $?
.br
- $$
.SH BUGS
There is no known bugs at the moment.
.SH EXAMPLE
.B Two ways to execute our shell :
.br
.B The intercative mode :
.br
$ ./hsh
.br
#cisfun$ /bin/ls
.br
hsh main.c shell.c
.br
#cisfun$ exit
.br
$
.br
.B The non-interactive mode :
.br
$ echo "/bin/ls" | ./hsh
.br
hsh main.c shell.c
.SH AUTHORS
Mariem Matri, Inès Chokri