-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathman_1_simple_shell
More file actions
executable file
·120 lines (110 loc) · 2.47 KB
/
Copy pathman_1_simple_shell
File metadata and controls
executable file
·120 lines (110 loc) · 2.47 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
.TH hsh 1 "April 16" "version 1.0" "Holberton simple_shell man page"
.SH NAME
hsh - Simple command interpreter shell-like
.SH SYNOPSIS
.B Non-ineractive
.br
echo "command" | ./hsh
.br
.B Interactive
.br
./hsh
.SH DESCRIPTION
hsh is a program of a simplified shell-alike command interpreter for Linux systems. The current version was compiled on Ubuntu 14.04 using gcc 4.8.4. This program intents to provide a command line user interface for Unix-like OS, it is more or less a micro version of the Unix Shell.
.I
.SS INVOCATION
.br
- Interactive mode.
.br
.br
\&$ ./hsh
.br
\&shellby~$
.br
- Redirecting the standart output.
\&$ echo "/bin/ls -l" | ./hsh
.SH FEATURES
.br
- Display a prompt and wait for the user to type a command.
.br
.br
- The commands lines handle arguments
.br
.br
- If an executable cannot be found, print an error message and display the prompt again
.br
.br
- Handle the “end of file” condition (Ctrl+D) and the signal (Ctrl+C)
.br
.br
- Print the enviroment with 'env'
.SH BUILT-IN
.br
.B
env
.br
- - Print the environment.
.br
.br
.B
exit
.br
- - Exit with a status custom status.
.br
.br
.SH EXAMPLES
.br
.br
.B - Interactive mode
.br
\&$ ./hsh
.br
\&shellby~$ /bin/ls /var
.br
\&backups cache chef crash lib local lock log mail opt run spool tmp
.br
\&shellby~$
.br
.br
.br
.B - Redirected input. Non-interactive mode
.br
.br
\&$ echo "/bin/ls -l /var" | ./hsh
.br
\&total 44
.br
\&drwxr-xr-x 2 root root 4096 Apr 16 06:39 backups
.br
\&drwxr-xr-x 12 root root 4096 Apr 16 06:37 cache
.br
\&drwxr-xr-x 3 root root 4096 Mar 23 16:30 chef
.br
\&drwxrwxrwt 2 root root 4096 Apr 16 13:28 crash
.br
\&drwxr-xr-x 53 root root 4096 Apr 16 06:37 lib
.br
\&drwxrwsr-x 2 root staff 4096 Apr 10 2014 local
.br
\&lrwxrwxrwx 1 root root 9 Nov 7 15:16 lock -> /run/lock
.br
\&drwxrwxr-x 10 root syslog 4096 Apr 15 13:59 log
.br
\&drwxrwsr-x 2 root mail 4096 Nov 7 15:16 mail
.br
\&drwxr-xr-x 2 root root 4096 Nov 7 15:16 opt
.br
\&lrwxrwxrwx 1 root root 4 Nov 7 15:16 run -> /run
.br
\&drwxr-xr-x 5 root root 4096 Nov 7 15:16 spool
.br
\&drwxrwxrwt 2 root root 4096 Nov 7 15:19 tmp
.br
.br
.br
.SH BUGS
No known bugs. For the current scope, but they are going to be added has they are found.
.SH BUGS REPORTS
All bug reports go to https://github.com/AndrewB4y/simple_shell.git, or the emails in the AUTHORS file in the repository.
.SH AUTHORS
Andrés Felipe Bayona, Luis Enrique Sanjuan..TH hsh 1 "27 November 2019" "1.0" "Holberton SHell Maunal"