-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathman_1_simple_shell
executable file
·113 lines (97 loc) · 1.84 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
.TH man 1 "20 November 2017" "1.00" "_SFSH man page"
.SH NAME
.B sfsh - Super Friendship SHell
.SH SYNOPSIS
sfsh [command_string]
.SH DESCRIPTION
SFSH is an sh-compatible command language interpreter that executes commands read from the standard input or from a file.
.SH INVOCATION
The Super Friendship SHell is compiled using the C89 standard with gcc and the following flags:
.P
.RS
.B $ gcc -Wall -Werror -Wextra -pedantic *.c sfsh
.P
.RE
Super Friendship SHell can be run in interactive mode as well! Just enter ./sfsh and press enter.
.P
.RS
.B $ ./sfsh
.SH EXECUTABLES
Example of executables:
.IP
.br
.\&
.RS
\&$ echo "Let's echo this"
.br
\&"Let's echo this"
.br
\&$
.SH BUILTINS
.IT
.B help
- Tells the user more about the SFSH and outputs a list of handy built-ins.
.B env
- Prints the environment variables of the current user
.B exit
- Allows the user to exit the Super Friendship SHell.
.B cd
- Allows the user to change directory
.B setenv
- Set the value into an environment. Will create a new entry if name does not exist.
.B unsetenv
- Removes the set entry from the environment
Examples of built-in commands:
.IP
.br
.\&
.RS
\&$ env
.br
\&XDG_SESSION_ID=4
.br
\&TERM=xterm-256color
.br
\&SELL=/bin/bash
.br
\&SSH_CLIENT=10.0.2.2 61225 22
.br
\&SSH_TTY=/dev/pts/2
.br
\&USER=vagrant
.br
\&MAIL=/var/mail/vagrant
.br
\&PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
.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 61225 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
\&_=./sfsh
.br
\&OLDPWD=/home/vagrant
.br
\&_=./sfsh
.br
\&$
.SH SEE ALSO
.I bash(1) sh(1)
.SH BUGS
No known bugs, besides all the checks we've missed.
.SH AUTHORS
Henry Hsu, David Yoon