/* * Assignment Six * * Using program five as a starting point, write * a new program that has the child check for * multiple pipe redirection operators. With each * operator discovered, a new child program will * have to be created to process the redirected input * and output. * * The program should be able to process the following * commands: * * ls -l | grep ^d | wc -l * which counts the number of directories (lines) * * cat /etc/passwd | cut -f1 -d: | sort | pr -h Users --columns=5 | more * which grabs the 1st field of the password file delimited * with the ":" character (cut) and arranges the account names * in alpabetical order (sort) and formats the output into * number pages with the title "Users," five columns per * page (pr) and displays the result one page at a time (more). * * Use the script program to show the program source code, * its compilation, and run time behavior. Show BOTH * success and failure when executing commands for * each operator. * * Begin with last week's program and add the following * abilities. * A. The ability to run even if there is no "<", ">", * or "|" operator on the command line. * B. The ability to create children for each additional * pipe operator encountered on the command line. * */