File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ Additional notes on the lab assignment based on existing implementations.
2+
3+ Last updated: Dec 31, 2018.
4+
5+ --------------------------------------------------------------------------------
6+ Refuse special characters that you do not implement yet. For example, if you do
7+ not implement pipes (as in the 1st phase), refuse it. It cannot work like this:
8+
9+ $ date | cat | sort | wc -l
10+ Mon Dec 31 13:06:56 CET 2018
11+
12+ $ echo hello | wc -l
13+ hello
14+
15+ If you did accept '|' as a normal character, it should have worked like this:
16+
17+ $ echo hello | wc -l
18+ hello | wc -l
19+
20+ However, please do something like this:
21+
22+ $ echo hello | wc -l
23+ (default rule matched) error:1: syntax error near unexpected token '|'
24+
25+ --------------------------------------------------------------------------------
26+ Please do implement command line history. In case of readline, it's really just
27+ calling one function, like this, for example:
28+
29+ if ((input = readline(prompt) ...
30+ ...
31+
32+ if (strcmp(input, "") != 0)
33+ add_history(input);
34+
35+ --------------------------------------------------------------------------------
36+ You need to accept full path as well as using the $PATH.
37+
38+ $ ls
39+ <output here>
40+
41+ $ /bin/ls
42+ <output here>
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ <h2><a name="practices">Practices and class assignments</a></h2>
119119into the school information system) is a < a
120120href ="./class-assignments/labs-assignment-2018.txt "> simple Unix/Linux shell.</ a >
121121
122+ < p > See < a href ="./class-assignments/extra-feedback.txt "> extra feedback</ a > based
123+ on what other students already handed over before you send it to us.
124+
122125< p >
123126< table bgcolor ="lightgreen ">
124127< tbody > < tr >
You can’t perform that action at this time.
0 commit comments