flex lex.l only once before you type make.
1. The internal shell command "exit" which terminates the shell.
Concepts: shell commands, exiting the shell
System calls: exit()
2. A command with no arguments.
Example: ls
Details: Your shell must block until the command completes and, if the return code is abnormal, print out a
message to that effect. This holds for all command strings in this assignment.
Concepts: Forking a child process, waiting for it to complete, synchronous execution.
System calls: fork(), execvp(), exit(), wait()
3. A command with arguments.
Example: ls -l
Details: Argument zero is the name of the command other arguments follow in sequence.
Concepts: Command-line parameters.
4. A command, with or without arguments, whose output is redirected to a file.
Example: ls -l > file
Details: This takes the output of the command and put it in the named file.
Concepts: File operations, output redirection.
System calls: close() and dup()
5. A command, with or without arguments, whose input is redirected from a file.
Example: sort < scores
Details: This takes the named file as input to the command.
Concepts: Input redirection, file operations.
System calls: close() and dup()
6. A command, with or without arguments, whose output is piped to the input of another command.
Example: ls -l | more
Details: This takes the output of the first command and makes it the input to the second command.
Concepts: Pipes, synchronous operation
System calls: pipe(), close() and dup()
A compressed tar file of your project directory, including your design document. You must do "make clean" before creating the tar file. In addition, include a README file to explain anything unusual to the teaching assistant. Your code and other associated files must be in a single directory so they will build properly in the submit directory.
Do not submit object files, assembler files, or executables. Every file in the submit directory that could be generated automatically by the compiler or assembler will result in a 5 point deduction from your programming assignment grade.
Your design document should be called DESIGN, and should reside in the project directory with the rest of your code. Your design should describe the design of your assignment in enough detail that a knowledgeable programmer could duplicate your work. This includes descriptions of the data structures you use, all non-trivial algorithms and formulas, and a description of each function including its purpose, inputs, outputs, and assumptions it makes about the inputs or outputs. A sample design document will be available on the course web page.