forked from svilladaniel/simple_shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathman_1_simple_shell
More file actions
executable file
·139 lines (81 loc) · 3.38 KB
/
man_1_simple_shell
File metadata and controls
executable file
·139 lines (81 loc) · 3.38 KB
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
138
139
.TH man 1 simple shell "August 2020"
.SH NAME
shell - command interpreter
.SH SYNOPSIS
.B shell [command][arguments]...
.SH DESCRIPTION
.PP
Shell is the standard command interpreter for the system. This man page is not intended to be a tutorial or a
complete specification of the shell.
.SS OVERVIEW
.PP
The shell is a command that reads lines from either a file or the termi‐
nal, interprets them, and generally executes other commands. It is the
program that is running when a user logs into the system (although a user
can select a different shell with the chsh(1) command). The shell is a command that reads lines from either a file or the termi‐
nal, interprets them, and generally executes other commands. It is the
program that is running when a user logs into the system (although a user
can select a different shell with the chsh(1) command). .PP
.SS Invocations
.PP
If command line arguments besides the options have been specified, then
the shell treats the first argument as the name of a file from which to
read commands (a shell script), and the remaining arguments are set as
the positional parameters of the shell ($1, $2, etc). Otherwise, the
shell reads commands from its standard input.
.SH Examples
.RS
.SS No interactive
.BI input:
$ echo "qwerty" | ./a.out
.BI Output:
error: No such file or directory
.BI input:
echo "ls -l" | ./a.out
.BI output:
total 64
-rwxrwxr-x 1 daniel daniel 26184 ago 17 23:11 a.out
-rw-rw-r-- 1 daniel daniel 188 ago 12 13:56 AUTHORS
-rw-rw-r-- 1 daniel daniel 1113 ago 18 13:52 built-in.c
-rw-rw-r-- 1 daniel daniel 2881 ago 17 22:55 core_functions.c
-rw-rw-r-- 1 daniel daniel 1001 ago 17 23:13 holberton.h
-rw-rw-r-- 1 daniel daniel 1212 ago 17 23:01 list_functions.c
-rw-rw-r-- 1 daniel daniel 1951 ago 18 19:13 man_sh
-rw-rw-r-- 1 daniel daniel 3528 ago 18 18:25 README.md
-rw-rw-r-- 1 daniel daniel 726 ago 17 23:11 shell.c
-rw-rw-r-- 1 daniel daniel 1524 ago 17 23:07 str_functions.c
-rw-rw-r-- 1 daniel daniel 0 ago 17 21:38 testing_tmp_file_29291
-rw-rw-r-- 1 daniel daniel 0 ago 17 21:38 testing_tmp_file_3505
-rw-rw-r-- 1 daniel daniel 0 ago 17 21:38 testing_tmp_file_5322
$
.SS Interactive
.BI input:
daniel@daniel-BOHK-WAX9X:~/Holberton/simple_shell$ ./a.out
$ qwerty
.BI output:
error: No such file or directory
$
.BI input:
daniel@daniel-BOHK-WAX9X:~/Holberton/simple_shell$ ./a.out
$ ls -l
.BI output:
total 52
-rwxrwxr-x 1 daniel daniel 13792 ago 18 19:33 a.out
-rw-rw-r-- 1 daniel daniel 188 ago 12 13:56 AUTHORS
-rw-rw-r-- 1 daniel daniel 1091 ago 18 19:33 built-in.c
-rw-rw-r-- 1 daniel daniel 2881 ago 17 22:55 core_functions.c
-rw-rw-r-- 1 daniel daniel 1001 ago 17 23:13 holberton.h
-rw-rw-r-- 1 daniel daniel 1212 ago 17 23:01 list_functions.c
-rw-rw-r-- 1 daniel daniel 2634 ago 18 19:26 man_sh
-rw-rw-r-- 1 daniel daniel 3528 ago 18 18:25 README.md
-rw-rw-r-- 1 daniel daniel 726 ago 17 23:11 shell.c
-rw-rw-r-- 1 daniel daniel 1524 ago 17 23:07 str_functions.c
-rw-rw-r-- 1 daniel daniel 0 ago 17 21:38 testing_tmp_file_29291
-rw-rw-r-- 1 daniel daniel 0 ago 17 21:38 testing_tmp_file_3505
-rw-rw-r-- 1 daniel daniel 0 ago 17 21:38 testing_tmp_file_5322
$
.SH BUGS
if you found some issues or bugs please report to 1826@holbertonschool.com || 2057@holbertonschool.com
.SH AUTHORS
Valentina Jaramillo, .B 1826@holbertonschool.com
Daniel Villa, .B 2057@holbertonschool.com