You should be able to execute commands that are in the current directory using the “./” notation:
[1]$ ./hello
You should also be able to execute an command available in the PATH environment variable. For example:
[2]$ ls
If the user types in a command that is not on the PATH, then you should print an error message:
[3]$ foobar
foobar: command not found
You should be able to pass arguments to commands:
[4]$ echo hi there
You need to support file output redirection:
[5]$ echo hi there > hi.txt
This will create or overwrite a file called hi.txt and put the output of the first command into the file.
You need to support pipe redirection:
[6]$ echo world hello | wc
1 2 12
In both file redirection and pipe redirection you need to support multiple arguments.
Make sure to test your pipe with a large amount of data between two processes:
[7]$ seq 100000 | wc -l
10000
You need to support a built-in “cd” command to change directories:
[8]$ cd foo
[9]$ ls
[10]$ cd ..
[11]$ cd /home
[12]$ cd pi
cd by itself should return you to the home directory.
(Hint: use the chdir system call)