CMPSCI 197J: HW5


1.                                                                                                                                               (10 points)
Write a filter which will extract from /usr/dict/words all words containing all five vowels in alphabetical order.

2. How many words in /usr/dict/words contain atleast 4 consonants.   (10 points)

3.                                                                                                                                               (10 points)
Split the file /usr/dict/words into two halves, the first containing all words up to(but not including) middle, the second containing the rest.

4.                                                                                                                                                (20 points)
The Anytown and Blankshire Historical Society has decided to computerize its membership records. There are 3 classes of membership:
Annual, renewable on the anniversary of joining and subject to a fee of $10.00 each year.
Life, subject to a single payment of $250.00
Honorary, which gives the same rights and privileges as LIfe Membership, but is awarded by the Committee and no fee is payable.
Its membership secretary proposes to store its membership records in a file containing single-line records. Each record contains a number of colon separated fields, the number of fields dependent on the class of membership.
For annual members, the fields have the following meaning:
1. Surname
2. Firstname(s) or initials
3. Class of membership, the string 'annual'
4. Address
5. Home phone number
6. Date of first joining (dd/mm/yy)
7. Date renewal due

For life and honorary members, field 3 is 'life' and 'honorary; respectively, and there are only six fields. For example,
Bloggs:Fred:annual:1 High Street:1234:03/12/90:03/12/97
Smith:John:annual:2 High Street::13/01/97:13/01/98
Doe:Jane:life:3 HIgh Street:123 4567:22/02/93
Jones:Cllr. A.:honorary:New House:123 2313:22/02/93

Write shell scripts which will read a membership file from STDIN and produce the following information:
a. A list of member's names, sorted by category of membership, then alphabetically by surname.
b. A list of annual members whose membership has expired and is due for renewal.
c. The total number of annual members due to renew in the current year.
d. The total dues paid already by each member during their membership of the society.
e. A list of honorary members who will have been of 10 years standing in the current year.