CST8204:
Lab Exercise 7
Regular expressions
Use regular expressions on a copy of the password file (use ypcat) to answer the following:
Write the fifth field of your own record using ^your_user_id:
_____________________________________________________________________________
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:
_____________________________________________________________________________
Now list all the entries that have both an empty name field and no shell
_____________________________________________________________________________
How many students have the family name "Li"? And how many student family names start with the letters "Li"?
__________________________________ ________________________________________
How many students have a family name that ends with "son"? And how many faculty family names?
__________________________________ ________________________________________
What is the exact number of student accounts right now? What command did you use to find out?
__________________________________ ________________________________________
Who or what is the numeric user id 502 used for? How did you find it?
__________________________________ ________________________________________