forked from amartinezre05/simple_shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
man_1_simple_shell
108 lines (83 loc) · 1.82 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
.TH hsh 1 "August 28, 2019" "1.0" "hsh General Commands Manual"
.SH NAME
.B simple_shell - hsh
- command line interpreter or shell
.SH SYNOPSIS
.B ./hsh
.SH DESCRIPTION
simple_shell is a command line interpreter. It is a program that executes other programs, the user can run different commands or utilities/tools with some input data.
.SH OVERVIEW
simple_shell executes commands that the user puts on the terminal.
.B ls
- It is used to list information about files and directories within the file system. The ls utility is a part of the GNU core utilities which are installed on all Linux distributions.
.SH INVOCATION
Compile simple_shell with the GNU Compiler Collection:
.P
.RS
.B $ gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
.P
.RE
This shell works in two modes:
.TP
.B Interactive Mode
.TP
The shell read the commands from the standard input and executes them.
.TP
.B Non-interactive Mode
.TP
Reads the commands from a file sent thru a pipe, the commands will be executed.
.SH BUILTINS
The following builtin commands are supported:
.IT
.B env
- prints the environment variables
.B exit
- exits the program
Example of builtin command:
.IP
.br
.\&
.RS
\&$ env
.br
\&TERM=xterm-256color
.br
\&SHELL=/bin/bash
.br
\&SSH_CLIENT=10.0.2.2 50610 22
.br
\&SSH_TTY=/dev/pts/0
.br
\&USER=vagrant
.br
\&MAIL=/var/mail/vagrant
.br
\&PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
.br
\&PWD=/home/vagrant/simple_shell
.br
\&LANG=en_US.UTF-8
.br
\&SHLVL=1
.br
\&HOME=/home/vagrant
.br
\&LOGNAME=vagrant
.br
\&SSH_CONNECTION=10.0.2.2 50610 10.0.2.15 22
.br
\&LESSOPEN=| /usr/bin/lesspipe %s
.br
\&XDG_RUNTIME_DIR=/run/user/1000
.br
\&LESSCLOSE=/usr/bin/lesspipe %s %s
br.
\&OLDPWD=/home/vagrant
.br
\&_=./hsh
.SH BUGS
No known bugs.
.SH AUTHOR
Albéniz Martínez, Kelly Villa
.SH SEE ALSO
sh