Notes about the sample test cases for Project #1 ------------------------------------------------ Assume that all the commands shown are executed in the order presented here. Note that this is only a *sample* of the types of commands that we may use in testing your shell. This is by no means a comprehensive list and is no guarantee that these commands will be used to test your program. Path Handling ------------- Your shell should be able to handle path and directory combinations as used in the examples below. cd cd . cd .. cd /tmp cd /tmp/testdir cd /tmp/testdir/ cd /tmp cd testdir cd /tmp/testdir/. dir cd dir /tmp/testdir/ Echo command ------------ The echo command indicates that it takes a as an argument. You can treat this as a string in double quotes, or as a non-quoted string of characters with no spaces. echo "hello world" echo helloworld Set command ----------- The set and echo command below should produce the same output as the second echo command from above. set abc = helloworld echo $abc Shell variables assigned with the set command should be able to be used with other commands such as cd and dir. set def = testdir cd /tmp/$def/ set ghi = tmp dir /$ghi/$def Output redirection ------------------ set jkl = outdir dir /$ghi/$def > $jkl echo outdir echo $jkl External commands, more redirection ----------------------------------- In the following examples, assume that prog1 and prog2 are external programs that are located somewhere in the current PATH. Several examples below use both input and output redirection prog1 100 200 set ghi = 100 prog1 $ghi 200 prog2 100 200 < input.txt > output.txt set abc = output prog2 100 200 < input.txt > $abc.txt Output redirection to append to a file -------------------------------------- The following examples should append the output of the echo command to the file output.txt. echo "hello world" >> $abc.txt echo helloworld >> $abc.txt