Here is a sample output from a run of my shell program after only implementing the initial steps in the Strategy section of the lab.
Note: This program does not fork any processes to
execute the fake commands apple and banana: the program is simply
printing out debugging information that will help you test your code.
cs31shell> history
0 history
cs31shell> history
0 history
1 history
cs31shell> !1
0 history
1 history
2 history
cs31shell> apple
Running in the foreground: apple
cs31shell> banana &
Running in the background: banana &
cs31shell> history
0 history
1 history
2 history
3 apple
4 banana &
5 history
cs31shell> !3
Running in the foreground: apple
cs31shell> !4
Running in the background: banana &
cs31shell> !5
0 history
1 history
2 history
3 apple
4 banana &
5 history
6 apple
7 banana &
8 history
cs31shell> !7
Running in the background: banana &
cs31shell> !9
Running in the background: banana &
cs31shell> history
2 history
3 apple
4 banana &
5 history
6 apple
7 banana &
8 history
9 banana &
10 banana &
11 history
cs31shell> exit
Exiting