Homework 2

This homework is worth 10 points.

Goals

When you finish this homework you should:

Assignment

Read chapter 2 of the book.

  1. [1 point each] Read the man page for the command man on cslab100. Answer the following questions.
    1. What are the standard sections of the manual?
    2. A freshman is trying to find the name of all of the compilers on the system. Someone told them to search the main pages with the -k option. They complain to you that UNIX is broken because they have typed man -K compiler and it is not working right. Provide an informative response.
    3. What is the default pager used for man pages? What happens if you set the environment variable MANPAGER to cat?
    4. How can you get a plain text version of a man page?
  2. [1 piont each] Read the man page for the command man on cslab177. Answer the following questions.
    1. How do you account for the difference in the two man pages? (hint cat /etc/issue on each)
    2. What are the possible exit codes for man? How is each produced?
  3. [4 ponts] What is are the major differences between CentOS and the Fedora distributions? (Limit yourself to a paragraph or so, this is a quick investigation, not a term paper.)
  4. Pick any one of the following unix utilities (awk, sed, grep, groff, diff, sort,bc), preferably one you are not familiar with. You may look at either unix or gnu versions of a utility. (awk or gawk for example)
    1. [2 points] Describe the purpose of this utility.
    2. [1 point] What problems could you solve with this utility?
    3. [1 point] Provide a "neat" example of this utility in action.
  5. [1 point] In a shell, what is command substitution? Carefully experiment with this feature. I frequently use ssh `cat ~/homeMachine` because I can't remember the name of my machine at home.
Submit a hard copy of this paper at the beginning of class on the due date.