CST8204: Lab Exercise 7
Regular expressions

Use regular expressions on a copy of the password file (use ypcat) to answer the following:

  1. Write the fifth field of your own record using ^your_user_id:

    _____________________________________________________________________________

  2. Find my record, using my last name "Allison"; experiment with its case if it's not found, and write field 5 below; as a last resort, use ^allisor:

    _____________________________________________________________________________

  3. Now list all the entries that have both an empty name field and no shell

    _____________________________________________________________________________

  4. How many students have the family name "Li"? And how many student family names start with the letters "Li"?

    __________________________________ ________________________________________

  5. How many students have a family name that ends with "son"? And how many faculty family names?

    __________________________________ ________________________________________

  6. What is the exact number of student accounts right now? What command did you use to find out?

    __________________________________ ________________________________________

  7. Who or what is the numeric user id 502 used for? How did you find it?

    __________________________________ ________________________________________