Homework 1: Write a program that executes every command typed (assuming no argument for the command) until "quit" is entered. For each command executed, the program must report whether the command executed correctly. The program should also keep track of the number of commands typed, the number of failed executions, and the number of commands killed by signals. The failed command should include two cases, (1) when the executable cannot be found, and (2) the command exits with a non-zero code. The program output should be similar to that of the sample executable. ----------------------------------------------------------------------------- ./a.out ls command ls failed (exit code 255) /bin/sleep /bin/sleep: too few arguments Try `/bin/sleep --help' for more information. command /bin/sleep failed (exit code 1) ./a.out <-- a.out is killed command ./a.out success (exit code 0) ls command ls failed (exit code 255) /bin/ls a.out hw1.c hw1.c~ hw1.txt command /bin/ls success (exit code 0) /bin/date Sun Jan 11 08:03:38 EST 2009 command /bin/date success (exit code 0) quit total commands executed: 7 total failed commands: 3 total killed commands: 1