Final Projects for BCS 215
Fall 2018 / CRN 23797
(Tuesdays & Thursdays, 1:40-2:55pm)

NOTE CHANGE IN DUE DATE:

Completion of the Final Exam in-class
will begin at 1:10pm on Thursday May 17.



three

Write a bash shellscript to do the following:
(Be sure to start with a "shebang" to identify the shell language
and comment line(s) to state the purpose of your script and identify the author.)

four

NOTE:   In my sub-directory named bam, there is a file named presidents. (My username is martinb.)

Write a bash shellscript named four, to output answers to the following questions, with only one line per answer:

  1. Your name.
  2. Today's date.
  3. The host name of the unix system you are using.
  4. The full path to your home (login) directory.
  5. Your disk usage:  your total disk usage, summarized on one line only.

  6. How many lines in my presidents file contain the string "John".
  7. How many lines in my presidents file contain the string "Johnson".
  8. How many Presidents or Vice Presidents were named "James"?
  9. How many Presidents or Vice Presidents were named "Clinton"?
  10. Ask the user to enter two different names, then count the number of Presidents and Vice Presidents who have that name, and answer which name is more common (i.e., which name appears on more lines of the presidents file).

five

NOTE:   The file named presidents [see above] contains the full names of all Presidents and Vice Presidents.

Write a bash shellscript named five, to obtain two names from the command line (instead of reading them in), then count the number of Presidents or Vice Presidents who have that name, and answer which name is more common.

Create an empty file named "answers" and run your script with each of the following command lines, appending the outputs to the "answers" file.

Append a fifth line to the answers file, with the number of lines in presidents that do NOT contain any of the following names: