In the following pipeline, the find command (explained in Chapter 25) searches all the directories under /etc looking for fi les owned by userid root. The names of all such fi les are then written to...


In the following pipeline, the find command (explained in Chapter 25) searches all the directories under /etc looking for fi les owned by userid root. The names of all such fi les are then written to standard output, one per line. The output of find is piped to wc -l to count the lines:


find /etc -type f -user root -print | wc –l


As find does its work, it will generate various error messages you don’t want to see. Your goal is to rewrite the pipeline to throw away the error messages without affecting the rest of the output. Show how to do this for the Bourne Shell family. For extra credit, see if you can devise a way to do it for the C-Shell family. (Hint: Use a subshell within a subshell.)



Nov 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here