In this assignment, you will write a complete C program that will act as a simple command-line interpreter (i.e., a shell) for the Linux kernel. In writing your shell, you are expected to use the fork-exec-wait model. In particular, you are to implement the following:
$ ./a.out
minor3> ls
a.out grades.txt rec01.txt testdir phone.txt route.txt who.txt du.txt rec01.c file1 rec01sol.c minor3.c
minor3> ls -a -l -t
total 144
-rwx------ 1 mat0299 mat0299 7835 Feb 14 17:39 a.out
drwx------ 4 mat0299 mat0299 4096 Feb 14 17:39 .
-rw------- 1 mat0299 mat0299 2665 Feb 14 17:39 minor3.c
-rw------- 1 mat0299 mat0299 33 Feb 5 03:30 du.txt
-rw------- 1 mat0299 mat0299 33 Feb 5 01:28 file1
-rw------- 1 mat0299 mat0299 333 Feb 5 01:02 route.txt
drwx------ 2 mat0299 mat0299 4096 Feb 3 20:36 testdir
-rw------- 1 mat0299 mat0299 116 Feb 2 23:38 who.txt
-rw------- 1 mat0299 mat0299 52 Jan 24 11:15 phone.txt
-rw------- 1 mat0299 mat0299 200 Jan 19 02:37 grades.txt
-rw------- 1 mat0299 mat0299 1634 Jan 2 15:08 rec01.c
-rw------- 1 mat0299 mat0299 160 Jan 2 14:58 rec01.txt
-rw------- 1 mat0299 mat0299 1451 Jan 2 14:58 rec01sol.c
drwx------ 18 mat0299 mat0299 4096 Dec 12 21:04 ..
minor3> ls -alt
total 144
-rwx------ 1 mat0299 mat0299 7835 Feb 14 17:39 a.out
drwx------ 4 mat0299 mat0299 4096 Feb 14 17:39 .
-rw------- 1 mat0299 mat0299 2665 Feb 14 17:39 minor3.c
-rw------- 1 mat0299 mat0299 33 Feb 5 03:30 du.txt
-rw------- 1 mat0299 mat0299 33 Feb 5 01:28 file1
-rw------- 1 mat0299 mat0299 333 Feb 5 01:02 route.txt
drwx------ 2 mat0299 mat0299 4096 Feb 3 20:36 testdir
-rw------- 1 mat0299 mat0299 116 Feb 2 23:38 who.txt
-rw------- 1 mat0299 mat0299 52 Jan 24 11:15 phone.txt
-rw------- 1 mat0299 mat0299 200 Jan 19 02:37 grades.txt
-rw------- 1 mat0299 mat0299 1634 Jan 2 15:08 rec01.c
-rw------- 1 mat0299 mat0299 160 Jan 2 14:58 rec01.txt
-rw------- 1 mat0299 mat0299 1451 Jan 2 14:58 rec01sol.c
drwx------ 18 mat0299 mat0299 4096 Dec 12 21:04 ..
minor3> sdjdsf
sdjdsf: command not found
minor3> cd ..
cd: command not found
minor3> quit
$