-
Notifications
You must be signed in to change notification settings - Fork 9
/
man_1_simple_shell
84 lines (84 loc) · 2.33 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
.TH man 1 "12 April 2019" "HOLBERTON SCHOOL" "SIMPLE_SHELL"
.SH NAME
.B simple_shell
- a simple UNIX command interpreter
.SH SYNOPSIS
.B #include \(dqholberton.h\(dq
.sp
.B int hsh(void)
.SH DESCRIPTION
.B Overview
.sp
The simple shell is an application that reads lines from either a file or the
terminal, interprets them, and executes them. Users can interactively type directly
to the
running shell or pipe in shell scripts.
.sp
.B Invocation
.sp
If no args are present and if the standard input of the shell is connected to a
terminal, the shell is considered an interactive shell. An interactive shell prompts
before each command and handles programming and command errors differently.
.sp
.B Builtins
.sp
This section lists the builtin commands which are builtin because they need to perform
some operation that can't be performed by a separate process.
.sp
.IP "-exit [status]"
.sp
Terminate the shell process. If status is given, it is used as the exit status of
the shell; otherwise the exit status of the preceding command is used.
.sp
.IP "-help [builtin]"
.sp
Retrieve informational text on how use builtin
.sp
.IP "-unsetenv [variable]"
.sp
Unsets an environmental varibale of name [variable]
.sp
.IP "-setenv [key] [value]"
.sp
Set a local environmental variable with key-value pair. If key already exists, this
action will replace the existing key with new value.
.sp
.IP "-cd [directory]"
.sp
Change working current directory to target directory. If "-" is inputted as second
argument, it will change to last working directory. If ".." is inputted, it will
take user to parent directory. If input is omitted, then user is take to $HOME.
.sp
.IP "-alias"
.sp
Work in progress in current version.
.sp
.IP "-history"
.sp
Work in progress in current version.
.sp
.SH EXIT STATUS
.sp
Errors that are detected by the shell, such as a syntax error, will cause the shell to
exit with a non-zero exit status. Otherwise the shell will return the exit status of
the last command executed, or if the exit builtin is used with a numeric argument,
it will return the argument.
.sp
.SH ENVIRONMENT
.sp
.IP HOME
User's login directory
.sp
.IP PATH
The default search path for executables
.sp
.IP PS1
The primary prompt string, which defaults to “$ ”
.SH FILES
.SH HISTORY
.SH BUGS
.ip Expansions only work once per stdin read
.SH AUTHOR
Tu Vo and Josef Goodyear
.SH SEE ALSO
.BR sh (1)